Skip to content

igl/prelude

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Prelude

Utility set for JavaECMAScript. Includes a lot of common helpers for primitive transformations and control flow. Most functions are curried for a smooth integration with your API.

  • Written in LiveScript, because Javascript.
  • Inspired by prelude-ls, underscore and fast.fs.
  • JS-orientated (does NOT includes abstractions for trivial things like head, tail, chars, now)

Install:

npm install prelude

Method Index:

Strings prelude.strings.<method>

  • repeat
  • reverse
  • capitalize
  • capitalizeSentence
  • camelize
  • dasherize

Numbers prelude.numbers.<method>

  • even
  • odd
  • random
  • range
  • gcd
  • lcm

Arrays prelude.arrays.<method>

  • empty
  • clone
  • each
  • map
  • filter
  • flatten
  • shuffle
  • reverse
  • partition
  • unique
  • uniqueBy
  • difference
  • intersection
  • union
  • countBy
  • groupBy
  • sortBy
  • splitAt
  • indexOf
  • IndicesOf
  • findIndex
  • findIndices

Objects prelude.objects.<method>

  • empty
  • clone
  • keys
  • values
  • each
  • map
  • filter
  • partition
  • keyOf
  • keysOf
  • findKey
  • findKeys
  • fromPairs
  • toPairs
  • hasOwnProperty
  • mixin
  • deepMixin
  • fill
  • deepFill
  • freeze
  • deepFreeze
  • toString
  • parseString
  • fromString

Funcs prelude.funcs.<method>

  • curry
  • apply
  • chain
  • tryCatch
  • flip

Types prelude.types.<method>

  • getType
  • isType