Pure Function, More Attention

npm NPM

//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

  1. install
npm i @holyhigh/func.js
  1. 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

  1. use test to do jest
  2. use build to rollup func.js
  3. use doc to gen tsdoc