v0.9.0
(One of the biggest additions to Kyanite since launch)
Check out the milestone here: https://github.com/dhershman1/kyanite/milestone/3?closed=1
Breaking Changes
isEqual
now takes order of arrays into consideration and will return false if arrays do not match in orderwhen
is no longer a maybe return and should give back the original data passed in. It also supports only a single param passed in- New
List
type for similar functions that apply to a List of characters (string) and a List of items (Array)slice
has been moved to this typeincludes
has been moved to this typeconcat
has been moved to this typereversed
has been moved to this typenth
has been moved to this type
concat
flow changed a little bit to work more like built in concat- In order to achieve array type simply use
concatMap
like so:concatMap(x => x, [[1, 2], [3, 4], [5, 6]])
- In order to achieve array type simply use
range
now requires you to pass 2 params to it, it is curried out of the box as well.- The parameters for
gt
,gte
,lt
andlte
have been flipped to meet the proper data last structure
Deprecated
pluck
: Shaky code stack, and lack of use cases thatprops
andprop
can't handlestrip
: No real use cases to benefit from thisempty
: No real use cases to benefit from thiscontains
: Useincludes
within the list type
New
- Added
always
function which takes 2 params and always returns the first one. Good for pipes since its curried - Added
compose
function (finally) - Added
unless
function which takes 3 params, and acts the opposite ofwhen
- Added
split
function which takes a char and a string and splits the string based on the char - Added
takeWhile
function which will take values from an array based on a function boolean - Added
dropWhile
function which will drop values from an array based on a function boolean - Added
apply
function which takes an array of data and applys a function to it - Added
either
function which takes 2 functions and a value and if either function returns truthy will return true - Added
endsWith
function which checks if the passed in list ends with the given value
Improved
- Documentation for
includes
andidentity
functions - Removed unused code (
circular
andisObject
) - Added handling for an edge case with
Object.keys
inside ofisEqual
Fixed
filter
had incorrect data types within its documentationwhen
documentation typos and no longer hard to read