chore: ramda-adjunct v2.22.0 release

Vladimir Gorej
Nov 1 · 3 min read
ramda-adjunct v2.22.0

We’ve just released ramda-adjunct v2.22.0. This release contains features produced by OSS contributors via Hacktoberfest initiative. I’ve written a separate followup article on what effect the Hacktoberfest initiative had on ramda-adjunct library. Let’s now look at features, one by one, that our contributors have produced. We have a lot to cover…

anyP

Returns a promise that is fulfilled by the first given promise to be fulfilled, or rejected with an array of rejection reasons if all of the given promises are rejected. This function can also be accessed via firstP alias.

noneP

Returns a Promise that is resolved with an array of reasons when all of the provided Promises reject, or rejected when any Promise is resolved. This pattern is like allP, but fulfillments and rejections are transposed — rejections become the fulfillment values and vice versa.

allUnique

Returns true if all items in the list are unique. R.equals is used to determine equality.

notAllUnique

Returns true if at least one item of the list is repeated. R.equals is used to determine equality.

toArray

Converts value to an array.

divideNum

Divides two numbers, where the second number is divided by the first number.

subtractNum

Subtracts its first argument from its second argument.

pathOrLazy

If the given, non-null object has a value at the given path, returns the value at that path. Otherwise returns the result of invoking the provided function with the object.

unzipObjWith

Creates a new list out of the supplied object by applying the function to each key/value pairing.

zipObjWith

Creates a new object out of a list of keys and a list of values by applying the function to each equally-positioned pair in the lists. Key/value pairing is truncated to the length of the shorter of the two lists.

replaceAll

This function already existed inside the codebase, but we aligned it’s behavior with TC39 stage 3 proposal.

padCharsEnd

The function pads the current string with a given string (repeated, if needed) so that the resulting string reaches a given length. The padding is applied from the end of the current string.

padCharsStart

The function pads the current string with a given string (repeated, if needed) so that the resulting string reaches a given length. The padding is applied from the end of the current string.

padEnd

The function pads the current string with an empty string so that the resulting string reaches a given length. The padding is applied from the end of the current string.

trimEnd

Removes whitespace from the end of a string.

trimStart

Removes whitespace from the beginning of a string.

isSafeInteger

Checks whether the passed value is a safe integer.

isMap

Predicate for determining if a provided value is an instance of a Map.

isNegativeZero

Checks if value is a negative zero (-0).

isSet

Predicate for determining if a provided value is an instance of a Set.

isSymbol

Checks if input value is a Symbol.

isPositiveZero

Checks if value is a positive zero (+0).

I want to thank all Hacktoberfest (and non Hacktoberfest) contributors for great job they did during last month. Thank you all for your contributions!

Like always, I end my article with the following axiom: Define your code-base as pure functions and lift them only if needed. And compose, compose, compose…

Ramda Adjunct

Ramda Adjunct is the most popular and most comprehensive set of utilities for use with Ramda, providing a variety of useful, well tested functions with excellent documentation.

Vladimir Gorej

Written by

Ramda Adjunct

Ramda Adjunct is the most popular and most comprehensive set of utilities for use with Ramda, providing a variety of useful, well tested functions with excellent documentation.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade