getEq
has been deprecated. Usematches
orwhere
for similar functionality.pair
has been deprecated.lens
has been deprecated.lensProp
has been deprecated.set
has been deprecated. UseassocIn
for similar functionality.over
has been deprecated. UseupdateIn
for similar functionality.view
has been deprecated. UsegetIn
for similar functionality.
- Documentation site has been entirely redesigned.
mean
no longer throws if the list is empty, returns0
instead.rangeBy
no longer throws for bad ranges, returns an empty list instead.transform
no longer throws for invalid transforms, the original value is passed through.
- The redash API no longer modifies function names. This will eventually be moved to a separate addon for developer usage.
- Added
assocIn
. - Added
everyPred
. - Added
matches
.
assoc
now respects arrays (does not convert them to array-like objects).
- Removed
gt
, use>
inline instead. - Removed
gte
, use>=
inline instead. - Removed
lt
, use<
inline instead. - Removed
lte
, use<=
inline instead. - Removed
flip
, use arrow functions instead. - Removed
fmap
. - Removed
of
.
- Added
difference
. - Added
interpose
. - Added
invert
.
compose
now has a correcttoString
representation.pipe
now has a correcttoString
representation.
- Miscellaneous TypesScript definition improvements.
get
no longer throws when the target is nil, now returns undefined.getIn
no longer throws when the target is nil, now returns undefined.rangeBy
now returns an empty array when start === end.compose
no longer performs runtime type checking.pipe
no longer performs runtime type checking.- Eliminated extra toString calls in
equals
.
- Improved TypeScript definitions.
path
will be deprecated in future releases.prop
will be deprecated in future releases.propEq
will be deprecated in future releases.
isEmpty
now returns true for falsy values.
- Added rudimentary TypeScript definitions.
- Added
update
. - Added
updateIn
.
- Renamed
path
togetIn
. - Renamed
prop
toget
. - Renamed
propEq
togetEq
.
trace
now correctly returns a tapped function. This was broken after function naming was implemented.
mapValues
has been deprecated becausemap
now supports objects. Replace usage ofmapValues
withmap
.identical
now implements SameValueZero semantics. The only breaking change here is thatNaN
is now treated as identical toNaN
.
- Added
intersection
. - Added
match
. - Added
pad
. - Added
padLeft
. - Added
padRight
. - Added
unique
.
- Functions with an arity > 3 now properly report their arity when partially applied.
map
now supports plain objects.- Curried functions now provide better stringified representations for a better debugging experience.
identical
now implements SameValueZero semantics. This affects any function, such asequals
, that performs identity checks.
- Internal
arity
function no longer preservesthis
context. This should not affect the public API, but always be sure that you are not implicitly relying onthis
when working with redash.
- Added
clamp
. - Added
groupBy
. - Added
takeUntil
. - Added
trace
. - Added
transform
. - Added
flatMap
alias forchain
.
concat
now dispatches to the first argument'sconcat
method.concat
now supports strings.curry
now supplies all arguments to the wrapped function. This improves support for functions that do not properly report their arities.filter
now works for objects.reject
now works for objects.
pipe
andcompose
are now unary and require the functions to be wrapped in an array.
pipe(fn1, fn2, fn3) // old
pipe([fn1, fn2, fn3]) // new
compose(fn3, fn2, fn1) // old
compose([fn3, fn2, fn1]) // new
Beside making the signature for these functions more sane and in line with the rest of the redash API, this change has an added benefit for fans of the trailing comma:
// Error!
pipe(
fn1,
fn2,
fn3,
)
// OK!
pipe([
fn1,
fn2,
fn3,
])
- Added
init
. - Added
path
. - Added
replace
.
contains
now supports strings.pipe
andcompose
are now both unary.
- Added
F
. - Added
T
. - Added
partition
.
mapIndexed
is nowmapi
.
pipe
andcompose
now throw early if they receive arguments that are not functions.
- Added
pick
. - Added
omit
.
- Added
mapKeys
. - Added
mapValues
. - Added
where
.
append
now appends a list correctly rather than concatenating.isOdd
now correctly returns false for all non-integers.
append
can now handle strings, making it a correct mirror ofprepend
.
- Removes usage of
const
injuxt
. - Removes usage of
const
inlensProp
.
- Created online API documentation.
- Added
contains
. - Added
divide
. - Added
dropWhile
. - Added
dropUntil
. - Added
empty
. - Added
isEmpty
. - Added
isEven
. - Added
isOdd
. - Added
isType
(formerlyis
). - Added
juxt
. - Added
max
. - Added
mean
. - Added
min
. - Added
multiply
. - Added
prepend
. - Added
test
. - Added
unless
. - Added
values
. - Added
when
.
rangeBy
now throws for invalid ranges.
range
now supports negative ranges.
- Removed
is
, it is nowisType
.
- All objects are now compared deeply by value rather than by reference.
- Added
complement
. - Added
fmap
. - Added
gt
. - Added
gte
. - Added
identical
. - Added
is
. - Added
join
. - Added
length
. - Added
lt
. - Added
lte
. - Added
pair
. - Added
trim
. - Added
type
.
reject
received a performance boost.- Rewrote test suite with AVA.
- Fixed
insert
to no longer (incorrectly) replace the existing element at the target index.
- Renamed
flatMap
tochain
.
- Removed
not
.
- Added
takeWhile
. - Added
compact
.
findLast
performance boost, now iterates from the end of the list.flattenDeep
received a huge performance boost by eliminating slowconcat
calls.
- Fixed
fromPairs
reduce implementation where the accumulator was mutated, affecting subsequent invocations.
- Removed
takeUntil
.