Pure Function, More Attention
//object_.each<string, string>({ 1: 'a', 2: 'b', 3: 'c' }, (v,k)=>{})//dom list_.each<HTMLElement>(document.body.children, (el)=>{})//array_.each([1, 2, 3], num=>{})//set_.each(new Set([1, 2, 3]), num=>{})
Func.js
Func.js is a TS library of pure functions, providing developers with a more convenient, comprehensive, and diversified declarative programming experience.
Features
- Unified interface for collections and other modules
- 200+ Pure functions
- Lazy evaluation
- Tree APIs
- Full dateTime/number formatter
- and more...
Quick start
- install
npm i @holyhigh/func.js
- import
import _ from '@holyhigh/func.js'//orimport {each} from '@holyhigh/func.js'//orimport {each,map} from '@holyhigh/func.js/collection'//orimport _ from 'https://cdn.skypack.dev/@holyhigh/func.js'
Development
- use
test
to do jest - use
build
to rollup func.js - use
doc
to gen tsdoc
Table of Contents