Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/holyhigh2/func.js
A TS library of pure functions
https://github.com/holyhigh2/func.js
Last synced: 8 days ago
JSON representation
A TS library of pure functions
- Host: GitHub
- URL: https://github.com/holyhigh2/func.js
- Owner: holyhigh2
- License: mit
- Created: 2023-01-30T06:35:33.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2023-04-02T15:15:23.000Z (over 1 year ago)
- Last Synced: 2024-11-29T08:15:01.779Z (29 days ago)
- Language: TypeScript
- Homepage: https://holyhigh2.github.io/func.js/
- Size: 1.73 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Pure Function, More Attention
![npm](https://img.shields.io/npm/v/@holyhigh/func.js?style=plastic)
![NPM](https://img.shields.io/npm/l/@holyhigh/func.js)```ts
//object
_.each({ 1: 'a', 2: 'b', 3: 'c' }, (v,k)=>{})
//dom list
_.each(document.body.children, (el)=>{})
//array
_.each([1, 2, 3], num=>{})
//set
_.each(new Set([1, 2, 3]), num=>{})
```
> English | [δΈζ](./README_ZH.md)## Func.js
Func.js is a TS library of pure functions, providing developers with a more convenient, comprehensive, and diversified declarative programming experience.- [π Documentation](https://holyhigh2.github.io/func.js/)
- [β‘ Play on StackBlitz](https://stackblitz.com/edit/func-js?file=index.ts)## Features
- Unified interface for collections and other modules
- **200+** Pure functions
- Lazy evaluation
- Tree APIs
- Full dateTime/number formatter
- [and more...](https://holyhigh2.github.io/func.js/api/readme/)## Quick start
1. install
```sh
npm i @holyhigh/func.js
```
2. import
```ts
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