1.0.0 • Published 2 years ago

myntra-fn v1.0.0

Weekly downloads
-
License
BSD-2-Clause
Repository
-
Last release
2 years ago

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