All Projects β†’ infinitered β†’ ramdasauce

infinitered / ramdasauce

Licence: other
Ramda smothered in saucy helpers.

Programming Languages

javascript
184084 projects - #8 most used programming language

Labels

Projects that are alternatives of or similar to ramdasauce

Imlazy
😴 Functional programming with lazy immutable iterables
Stars: ✭ 89 (+28.99%)
Mutual labels:  ramda
ramdatutorial
Companion source code for a Ramda Tutorial
Stars: ✭ 24 (-65.22%)
Mutual labels:  ramda
rocket-pipes
Powerful pipes for TypeScript, that chain Promise and ADT for you 🚌 -> ⛰️ -> 🚠 -> πŸ‚ -> πŸš€
Stars: ✭ 18 (-73.91%)
Mutual labels:  ramda
Ramda Debug
🐏 Debugging for Ramda.
Stars: ✭ 113 (+63.77%)
Mutual labels:  ramda
Rambdax
Extended version of Rambda
Stars: ✭ 148 (+114.49%)
Mutual labels:  ramda
Fae
A functional module for Deno inspired from Ramda.
Stars: ✭ 44 (-36.23%)
Mutual labels:  ramda
Dash
Functional programming library for PHP. Inspired by Underscore, Lodash, and Ramda.
Stars: ✭ 84 (+21.74%)
Mutual labels:  ramda
spellbook
Spellbook is a bookmark extension for Chrome and Firefox
Stars: ✭ 19 (-72.46%)
Mutual labels:  ramda
Zebras
Data analysis library for JavaScript built with Ramda
Stars: ✭ 192 (+178.26%)
Mutual labels:  ramda
learn-ramda
🐏 Learn ramda, the interactive way
Stars: ✭ 84 (+21.74%)
Mutual labels:  ramda
List
πŸ† An immutable list with unmatched performance and a comprehensive functional API.
Stars: ✭ 1,604 (+2224.64%)
Mutual labels:  ramda
Ramda Extension
🀘Utility library for functional JavaScript. With ❀️ to Ramda.
Stars: ✭ 139 (+101.45%)
Mutual labels:  ramda
ramdu
Small utils set built around Ramda
Stars: ✭ 18 (-73.91%)
Mutual labels:  ramda
Utils.js
Fast, small and purely functional utility library
Stars: ✭ 102 (+47.83%)
Mutual labels:  ramda
R.apex
Functional utility library for Apex
Stars: ✭ 80 (+15.94%)
Mutual labels:  ramda
Preact Redux Isomorphic
preact-redux-isomorphic PWA SPA SSR best practices and libraries in under 80kB page size (for live demo click the link below)
Stars: ✭ 85 (+23.19%)
Mutual labels:  ramda
ramda.py
Python clone of Ramda.js
Stars: ✭ 64 (-7.25%)
Mutual labels:  ramda
fp-ts-ramda
Ramda functions reimplemented in fp-ts
Stars: ✭ 129 (+86.96%)
Mutual labels:  ramda
validarium
πŸ›‘Agnostic validation library for JavaScript applications.
Stars: ✭ 29 (-57.97%)
Mutual labels:  ramda
mern-boilerplate
A Full MERN Stack Boilerplate for Web Apps including a local authentication system. Uses React, Express.js, MongoDB, Redux, Passport.js, Webpack, Testing, and more.
Stars: ✭ 211 (+205.8%)
Mutual labels:  ramda

Ramdasauce

Adds a few utilities based on the delicious Ramda library.

npm module

Installing

npm i ramdasauce --save

  • Depends on ramda 0.24.+.
  • Targets ES5.
  • Built with ES6.

Usage

Here's the quick list of functions and a simple example.

import RS from 'ramdasauce'

// --- Conversions ---
RS.toDate(1e12)             // a Number to a date Object
RS.toNumber('5')            // a String to a Number

// --- Object Shenanigans ---
const x = {a: 1, b: 2, c: {x: [5, 6]}}
RS.mapKeys(R.toUpper, x)    // transforms the keys of an object by the function
RS.dotPath('c.x.0', x)      // fetches a value from a nested object by a string path

// --- Generating Things ---
RS.rangeStep(2, 2, 10)      // generates a range of numbers with a step

// --- Finding Things ---
RS.findByProp('id', 'a', [{id: 'a', id: 'b'}])      // finds an object by propEq
RS.findIndexByProp('id', 'a', [{id: 'a', id: 'b'}]) // finds the index of an object by propEq

// --- Predicates ---
RS.isUndefined(qwerty)      // check if something is undefined
RS.isNotNil(null)           // check if something is not null or undefined
RS.isNilOrEmpty(null)       // checks if something is null, undefined or R.isEmpty
RS.isWithin(1, 2, 2)        // is the 3rd parameter within the range of 1st through 2nd?
RS.isNotWithin(1, 2, 100)   // is the 3rd parameter not within the range of 1st through 2nd?
RS.eqLength([1,2,3], 'abc') // tests 2 things to see if their length properties are the same

Prior Art

Most of these functions were lifted from stuff I wrote in real projects.

(leans in and whispers)

I did look at these tho:

Philosophy

These helper functions target that sweet spot between:

Not right for ramda core.

and

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:

RS.portmanteau('functor', 'wrecked')
RS.yearsForAnimalInAsianCalendars('monkey')

Feedback

Do you have any common ramda patterns you use frequently? Drop some issues or PRs in!

Release Notes

2.1.0 - Aug 12, 2017

  • upgrades to [email protected]
  • bumped all dev dependencies
  • marked previous mentioned functions with @deprecated in their comments

2.0.0 - May 29, 2017

  • DEPRECATIONS: startsWith and endsWith are flagged for removal in 3.0.0 (ramda has these now)
  • DEPRECATIONS: random and sample are flagged for removal in 3.0.0 (impure functions)
  • DEPRECATIONS: log and trace are flagged for removal in 3.0.0 (impure debug functions)
  • Upgrades to [email protected]
  • updates build process for much smaller bundle sizes

1.2.0 - February 6, 2017

  • Updates isWithin to play nice with Webpack - @hubciorz (#7)
  • Bumped dependencies - @skellock (#8)

1.1.1 - August 17th, 2016

1.1.0 - June 16th, 2016

1.0.0 - April 3rd, 2016

  • Initial Release
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].