prelude-ls
Advanced tools
Changelog
1.2.0
List.remove
Changelog
1.1.2
Func.memoize
zip-all
and zip-with-all
corner case (no input)Changelog
1.1.0
List
functions: maximum-by
, minimum-by
, unique-by
List
functions: at
, elem-index
, elem-indices
, find-index
, find-indices
Str
functions: capitalize
, camelize
, dasherize
Func
function: over
- eg. same-length = (==) `over` (.length)
Str.repeat
through main prelude
objectfoldr
and foldr1
, the new correct definition is backwards incompatible with the old, incorrect onefix
Changelog
1.0.2
flatten
- slight change with bug fix, flattens arrays only, not array-like objectsChangelog
1.0.0
Obj.map
), or use chars
or values
in other cases to transform into a list(obj.)
in LiveScript to do thatprelude = require('prelude-ls')
compact
, split
, flatten
, difference
, intersection
, union
, count-by
, group-by
, chars
, unchars
, apply
lists-to-obj
which takes a list of keys and list of values and zips them up into an object, and the converse obj-to-lists
pairs-to-obj
which takes a list of pairs (2 element lists) and creates an object, and the converse obj-to-pairs
cons
, append
- use the concat operatorcompose
- use the compose operatorobj-to-func
- use partially applied access (eg. (obj.)
)length
- use (.length)
sort-by
renamed to sort-with
sort-by
compare
- just use the new sort-by
break-it
renamed break-list
, (Str.break-str
for the string version)Str.repeat
which creates a new string by repeating the input n timesunfold
as alias to unfoldr
is no longer usedChangelog
0.6.0
fix
, a fixpoint (Y combinator) for anonymous recursive functionsunfoldr
(alias unfold
)replicate
with a string now returns a list of stringspartial
, just use native partial application in LiveScript using the _
placeholder, or curryingsort
, sortBy
, and compare