You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Why to choose ramda-extension over other libraries?
We focus on functional point-free code. Our goal is to keep codebase composed only from ramda functions, not from own code. Basically, we are using only const and ES6 modules from the JavaScript itself.
We have a few functions with side-effects (like log and trace) to support better developer's experience in debugging process. It is only for development purpose and it should not be used in production code.
Installation
$ yarn add ramda ramda-extension
or
$ npm install ramda ramda-extension
Usage
We support CommonJS and ES modules syntax.
Import function as a named export (not recommended without treeshaking):
import{toKebabCase}from'ramda-extension';import{flatten}from'ramda';// standard ramda function (if needed)toKebabCase('I wanna eat my kebab.')// "i-wanna-eat-my-kebab"flatten([1,2,[3,4],5])// [1, 2, 3, 4, 5]
NOTE: standard ramda functions are still accessed via 'ramda'
Alternatively you can import it separately if your environment doesn't support treeshaking (Sse babel-plugin-transform-imports):
importtoKebabCasefrom'ramda-extension/lib/toKebabCase';toKebabCase('I wanna eat my kebab.')// "i-wanna-eat-my-kebab"
If you prefer jQuery-style:
import*asR_from'ramda-extension'R_.toKebabCase('I wanna eat my kebab.')// "i-wanna-eat-my-kebab"
NOTE: Ramda itself is not part of bundle, you need to add it manually
CDN
You can use Ramda-extension directly in the browser: