Adds a few utilities based on the delicious Ramda library.
npm i ramdasauce --save
- Depends on
- Targets ES5.
- Built with ES6.
Here's the quick list of functions and a simple example.
// --- Conversions ---RS // a Number to a date ObjectRS // a String to a Number// --- Object Shenanigans ---const x = a: 1 b: 2 c: x: 5 6RS // transforms the keys of an object by the functionRS // fetches a value from a nested object by a string path// --- Generating Things ---RS // generates a range of numbers with a step// --- Finding Things ---RS // finds an object by propEqRS // finds the index of an object by propEq// --- Predicates ---RS // check if something is undefinedRS // check if something is not null or undefinedRS // checks if something is null, undefined or R.isEmptyRS // is the 3rd parameter within the range of 1st through 2nd?RS // is the 3rd parameter not within the range of 1st through 2nd?RS // tests 2 things to see if their length properties are the same
Most of these functions were lifted from stuff I wrote in real projects.
(leans in and whispers)
I did look at these tho:
These helper functions target that sweet spot between:
Not right for
Would never be used outside your app.
Functions being added here must be used in an app. Preferable more than once.
I hope this library won't turn into something like this:
Do you have any common
ramda patterns you use frequently? Drop some issues or PRs in!
2.1.0 - Aug 12, 2017
- upgrades to email@example.com
- bumped all dev dependencies
- marked previous mentioned functions with @deprecated in their comments
2.0.0 - May 29, 2017
endsWithare flagged for removal in 3.0.0 (ramda has these now)
sampleare flagged for removal in 3.0.0 (impure functions)
traceare flagged for removal in 3.0.0 (impure debug functions)
- Upgrades to firstname.lastname@example.org
- updates build process for much smaller bundle sizes
1.2.0 - February 6, 2017
isWithinto play nice with Webpack - @hubciorz (#7)
- Bumped dependencies - @skellock (#8)
1.1.1 - August 17th, 2016
1.1.0 - June 16th, 2016
- Adds findByProp & findIndexByProp - @kevinvangelder
- Fixes test environment - @skellock @kevinvangelder
- Bumped dependencies
1.0.0 - April 3rd, 2016
- Initial Release