myfx
TypeScript icon, indicating that this package has built-in type declarations

1.4.2 • Public • Published

My=f(x)

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=>{
    if(...)
        return false// you can break the loop at any time
})

English | 中文

Myfx

Myfx is a modular utility library with more utils, higher performance and simpler declarations

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 myfx
  1. import
import _ from 'myfx'
//or
import {each} from 'myfx'
//or
import {each,map} from 'myfx/collection'
//or
import _ from 'https://cdn.skypack.dev/myfx'

Development

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

Package Sidebar

Install

npm i myfx

Weekly Downloads

9

Version

1.4.2

License

MIT

Unpacked Size

1.03 MB

Total Files

31

Last publish

Collaborators

  • holyhigh