Skip to content

elclanrs/essential.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

essential.js

Latest: 1.1.20
Compatibility: Node, ES5, Common, AMD
License: MIT

npm install essentialjs
// Add functions to global namespace,
// `global` for Node or `window` for browser
require('essentialjs').expose(global)

Highlights

Essential.js is an alternative to Underscore.js that gives you a solid base to get started with functional programming in JavaScript:

API

module.exports = {
  # Core
  _, id, K,
  builtin, toArray,
  variadic, apply, applyNew,
  ncurry, λ, curry, partial,
  flip, flip3, nflip,
  unary, binary, nary,
  compose, pcompose, sequence, over,
  notF, not:notF, eq, notEq, typeOf, isType,
  toObject, extend, deepExtend, deepClone, forOwn,
  fold, fold1, foldr, foldr1, map, filter, any, all, each, indexOf, concat,
  slice, first, last, rest, initial, take, drop,
  inArray, remove, tails, uniqueBy, unique, dups,
  flatten, union, intersection, flatMap,
  pluck, deepPluck, where, deepWhere,
  values, pairs, interleave, intersperse, intercalate,
  zip, zipWith, zipObject, unzipObject,
  range, shuffle,
  sortBy, groupBy, countBy,
  format, template, gmatch, permutations, combinations, powerset,
  # Fantasy
  fmap, ap, chain, liftA, seqM
}

About

Essential JS - Functional JavaScript "the right way"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published