Skip to content

igl/prelude

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Prelude

Utility set for ECMAScript. Includes a lot of common helpers for primitive transformations, control flow and inheritance. All functions with 2 or more arguments are curried for a smooth integration with your API.

Install:

npm install prelude

Method Index:

Strings prelude.strings.<method>

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

Numbers prelude.numbers.<method>

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

Arrays prelude.arrays.<method>

  • empty
  • clone
  • head
  • first
  • tail
  • last
  • initial
  • each
  • slice
  • map
  • filter
  • flatten
  • shuffle
  • reverse
  • zip
  • zipWith
  • partition
  • unique
  • uniqueBy
  • difference
  • intersection
  • union
  • sortBy
  • countBy
  • groupBy
  • splitAt
  • index
  • indices
  • 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
  • definePublic
  • definePrivate
  • defineStatic
  • defineMeta

Funcs prelude.funcs.<method>

  • curry
  • apply
  • applyTo
  • flip
  • chain
  • tryCatch
  • Class

Types prelude.types.<method>

  • getType
  • isType