https://github.com/threepointone/fn
tiny lib of functional helpers for personal projects
https://github.com/threepointone/fn
Last synced: about 1 month ago
JSON representation
tiny lib of functional helpers for personal projects
- Host: GitHub
- URL: https://github.com/threepointone/fn
- Owner: threepointone
- Created: 2013-09-02T08:47:59.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2022-04-11T07:41:08.000Z (about 3 years ago)
- Last Synced: 2025-04-12T01:17:21.137Z (about 1 month ago)
- Language: JavaScript
- Size: 195 KB
- Stars: 2
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
a bunch of functional helpers, for when you don't need all of underscore. < 1k gzipped, always.
I plan on using this in my own modules via browserify/npm, but feel free to suggest changes, etc.
included -
- isValue
- identity
- indexOf
- keys
- values
- isArray
- toArray
- each
- extend
- map
- times
- invoke
- filter
- find
- reduce
- debounce
- composeadditionally, you can chain a series of these functions (à la underscore). eg -
```js
_.chain([1,2,3,4,5,6])
.map(function(x){ return x*2; })
.filter(function(x){ return x%3 === 0; })
.reduce(function(count, x){ return count+x; }, 0)
.val();
// 18
```