@holyhigh/func.js
TypeScript icon, indicating that this package has built-in type declarations

2.4.2 • Public • Published

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=>{})

English | 中文

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'
//or
import {each} from '@holyhigh/func.js'
//or
import {each,map} from '@holyhigh/func.js/collection'
//or
import _ 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

Package Sidebar

Install

npm i @holyhigh/func.js

Weekly Downloads

2

Version

2.4.2

License

MIT

Unpacked Size

1.12 MB

Total Files

33

Last publish

Collaborators

  • holyhigh