Skip to content
/ fn Public
forked from threepointone/fn

tiny lib of functional helpers for personal projects

Notifications You must be signed in to change notification settings

myntra/fn

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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
  • compose

additionally, you can chain a series of these functions (à la underscore). eg -

_.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

About

tiny lib of functional helpers for personal projects

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 97.9%
  • Makefile 2.1%