New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

redash

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redash

A better Standard Library for JavaScript

  • 0.20.0
  • npm
  • Socket score

Version published
Weekly downloads
23
decreased by-66.18%
Maintainers
1
Weekly downloads
 
Created
Source

Redash

Build Status dependencies Status

Check out the API docs!

The missing standard library for JavaScript. This lightweight library is meant to fill the gap between Ramda (functional) and Lodash (performance) while providing you with the tools you need to write sane JavaScript. This means that all functions are immutable, auto-curried, and designed for composition by expecting data last.

  1. Why
  2. Usage
  3. Comparisons

Why?

First Class Functional Programming

Redash's guiding principle is to support and encourage functional programming styles. Unlike some other libraries that simply offer FP-ish wrappers, functional programming is a first class citizen in Redash. This means that every function is immutable, auto-curried, and written to expect data last to facilitate composition. Redash also compares objects by value, not reference, which allows you to start working with data in a meaningful way without concerning yourself with how it's stored in memory.

Built for the Next Generation of JavaScript

The Redash codebase is written with ES2015 modules and packaged with rollup, allowing you to take advantage of tree shaking to produce slimmer bundles without the need for extra tooling.

Usage

npm i --save redash

After that's done, just import it in your code and get on to building awesome stuff. If you haven't already done so, you should check out the API documentation to see what functions are available and learn how to use them. With that out of the way, here are two of the most common ways to use Redash:

ES2015 Module

import { map, prop } from 'redash'

map(prop('name'), [{ name: 'Dwight' }, { name: 'Jim' }]) // => ['Dwight', 'Jim']

Installer

If you have full control over your codebase and don't want to continually import/prefix all of the functions, you can install the library to a context.

import install from 'redash/installer'

install(global)

// Now all of the functions are available on the scope you installed it to:
prop('name', { name: 'Michael' }) // => 'Michael'

Comparisons

CategoryRedashRamdaLodashLodash-FP
Minified (kb)10.141.170.181.2
100% ImmutableYesYesNoYes
Auto-CurryYesYesNoYes
Object EqualityValueValueReferenceReference
IE 9+YesYesYesYes

FAQs

Package last updated on 22 May 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc