MCPcopy Index your code
hub / github.com/char0n/ramda-adjunct

github.com/char0n/ramda-adjunct @v6.1.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v6.1.0 ↗ · + Follow
201 symbols 1,108 edges 548 files 13 documented · 6% 2 cross-repo links
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Node.js workflow codecov jsdoc npmversion npm Dependabot enabled startwithwhy contributions welcome try on RunKit FOSSA Status Backers on Open Collective Sponsors on Open Collective Join the chat at https://gitter.im/ramda-adjunct/Lobby Open Source Helpers Tidelift

Ramda Adjunct Tweet

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

For a full list of functions see the Documentation For The Latest Release.

Adjunct is a thing added to something else as a supplementary rather than an essential part. And that something is being ramda.

Follow Ramda Adjunct on medium.com/ramda-adjunct to read latest news and articles about the library.

Tidelift Get professionally supported ramda-adjunct with Tidelift Subscription.

Getting Started

Installation

npm i ramda-adjunct

or

yarn add ramda-adjunct

Usage

ES6

import * as RA from 'ramda-adjunct'

RA.isArray([]);

or

import { isArray } from 'ramda-adjunct';

isArray([]);

Node

const RA = require('ramda-adjunct');

RA.isArray([]);

or

const { isArray } = require('ramda-adjunct');

isArray([]);

Web browser

<script src="https://github.com/char0n/ramda-adjunct/raw/v6.1.0/ramda.js"></script>
<script src="https://github.com/char0n/ramda-adjunct/raw/v6.1.0/RA.web.js"></script>

or

<script src="https://github.com/char0n/ramda-adjunct/raw/v6.1.0/RA.web.standalone.js"></script>

Including Ramda Adjunct into HTML document exposes global variable RA on window object.

RA.isArray([]);

Motivation

It's very common for people to create their own utils and recipes by composing Ramda's functions and creating more complex aggregate functions. Ramda Adjunct eliminates this repetitive wheel of reinvention and centralizes commonly used and useful utils.

Benefits

1. Centralization

All Ramda recipes and aggregate utils not present in Ramda are centralized here. There is no more need for everybody to create their own utils in their own libraries or in each codebases.

2. Tests

Ramda Adjunct maintains maximal code coverage and mimics Ramda's test patterns. You can trust our functions.

3. Impeccable documentation

You cannot call a library great if it lacks great documentation. Ramda Adjunct generates its documentation directly from its codebase and uses patterns found in both Ramda and Lodash to document its API.

Do you want to find out more about why this library exists ? Read this article.

Requirements

  • ramda >= 0.32.0
  • node >= 0.10.48

Ramda Adjunct is being automatically tested against all LTS and Current Node.js versions.

Legacy builds

We are building our npm distributions using Webpack/Babel to support legacy versions of node starting from 0.10.48. Although all tests are run against all LTS and Current Node.js versions, we rely on Webpack/Babel to transpile ramda-adjunct into legacy ES5. It is also possible that our ES5 distributions run on node versions older than 0.10.48 as long as they support ES5.

API Documentation

LATEST, PREVIOUS, ALL VERSIONS

Wrote about us

Contributing

If you want to contribute to this project, please consult the CONTRIBUTING.md guidelines.

Obtaining project copy

 $ git clone https://github.com/char0n/ramda-adjunct
 $ npm i

Running tests

 $ npm run test

Running tests in browser

 $ npm run test:web

Running compatibility tests for supported ramda versions

 $ npm run test:ramda

Running code coverage numbers

 $ npm run coverage

Running linter

We're using eslint and airbnb codestyle rules with prettier integrated as an eslint plugin.

 $ npm run lint

Builds

 $ npm run build:es

If you use a bundler that supports tree shaking and ES2015 imports. package.json is automatically pre-configured to tell ES2015 import to import from this directory.

es/* - ES5 code containing ES2015 imports.

 $ npm run build:commonjs

If you use node to import ramda-adjunct. package.json is automatically pre-configured to tell require to import from this directory.

lib/* - ES5 code containing commonjs imports.

 $ npm run build:umd

The command will create three types of bundles.

dist/RA.node.js - ES5 compliant bundle, running on all node versions.

dist/RA.web.js - ES5 compliant bundle, running in browsers. Requires ramda.js to be required before.

dist/RA.web.standalone.js - ES5 compliant bundle, running in browsers. It has ramda.js pre-bundled.

You can always find fresh build files in exposed as artifacts of GitHub Actions.

Tree shaking support

Tree shaking is a term commonly used in a JavaScript context for dead-code elimination. It relies on the static structure of ES2015's module syntax, i.e. import and export. Ramda Adjunct natively supports tree shaking thanks to the way the code is organized and its use of ES2015 imports.

  import * as RA from 'ramda-adjunct';

  RA.isArray([]); //=> true
  import { isArray } from 'ramda-adjunct';

  isArray([]); //=> true

These two statements are equivalent and only isArray should be incorporated into your bundle. You can pick and choose the functions you need without worrying about the whole library being included in your build.

Assimilated libraries

  • rcb - Ramda Cookbook implementation

Typescript support

Although Ramda Adjunct is written in ES2016, we also support Typescript. When Ramda Adjunct gets imported into a Typescript project, typings are automatically imported and used.

Author

char0n (Vladimir Gorej)

vladimir.gorej@gmail.com

https://www.linkedin.com/in/vladimirgorej/

Contributors

This project exists thanks to all the people who contribute. [Contribute].

Support us

Although we love working on ramda-adjunct, we must invest our free time to make this library great. Support this project's evolution via Open Collective or Github Sponsors.

Support via Open Collective

Backers

Thank you to all our backers! 🙏 [Become a backer]

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]

License

FOSSA Status

Extension points exported contracts — how you extend this code

Functor (Interface)
(no doc) [1 implementers]
types/index.d.ts
SomeObj (Interface)
(no doc)
types/test/isNotPrimitive.ts
Apply (Interface)
(no doc) [1 implementers]
types/index.d.ts
SomeObj (Interface)
(no doc)
types/test/isPrimitive.ts
Semigroup (Interface)
(no doc) [1 implementers]
types/index.d.ts
Dictionary (Interface)
(no doc)
types/test/filterIndexed.ts
Foldable (Interface)
(no doc)
types/index.d.ts
Test (Interface)
(no doc)
types/test/isNotNil.ts

Core symbols most depended-on inside this repo

g
called by 100
test/mapIndexed.js
of
called by 100
src/fantasy-land/Identity.js
f
called by 57
test/allEqual.js
equals
called by 46
src/fantasy-land/Identity.js
Just
called by 35
test/included.js
IdentityArb
called by 29
test/fantasy-land/Identity.mjs
map
called by 26
types/index.d.ts
cata
called by 26
types/index.d.ts

Shape

Function 140
Method 33
Class 16
Interface 12

Languages

TypeScript100%

Modules by API surface

src/fantasy-land/Identity.js23 symbols
types/index.d.ts14 symbols
src/fantasy-land/traits.js6 symbols
test/neither.js5 symbols
test/mapIndexed.js5 symbols
test/lensTraverse.js5 symbols
src/internal/ponyfills/Promise.any.js5 symbols
types/test/isIterable.ts4 symbols
types/test/filterIndexed.ts4 symbols
test/weaveLazy.js4 symbols
test/weave.js4 symbols
test/notBoth.js4 symbols

Used by 2 indexed graphs manifest dependencies, hub-wide

For agents

$ claude mcp add ramda-adjunct \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page