0.23.0 • Published 7 years ago

redash v0.23.0

Weekly downloads
133
License
ISC
Repository
-
Last release
7 years ago

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 easily composable.

  1. Why
  2. Usage
  3. Comparisons

Why?

First Class Functional Programming

Redash is designed to encourage functional programming styles without sacrificing the utility you're used to. What sets it apart is that, unlike some other libraries that simply offer FP-ish wrappers, functional programming is a first class citizen in Redash. Here's what that means for you:

  • Immutability - Redash will never mutate your data; objects are always shallowly copied.
  • Auto-Curry - Every function in the redash API is curried. Use them as building blocks to create more complex functionality.
  • Equality - Objects are compared by value, not reference. Work 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 so you to take advantage of tree shaking without the need for extra tooling. Redash also offers complete typings for TypeScript users so that you can work with its API with complete confidence.

Usage

# Yarn (Recommended)
yarn add redash

# NPM (Alternative)
npm install --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. Here are a few of the most common ways to use Redash:

CommonJS

const _ = require('redash')            // import everything
const { map, get } = require('redash') // or just what you need

ES2015 Module

import * as _ from 'redash'       // import everything
import { map, get } from 'redash' // or just what you need

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:
get('name', { name: 'Michael' }) // => 'Michael'

Comparisons

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

7 years ago

0.22.0

7 years ago

0.21.1

7 years ago

0.21.0

7 years ago

0.19.0

7 years ago

0.20.1

7 years ago

0.20.0

7 years ago

0.19.1

7 years ago

0.18.0

7 years ago

0.17.0

7 years ago

0.16.0

7 years ago

0.15.1

7 years ago

0.15.0

7 years ago

0.14.2

7 years ago

0.14.1

8 years ago

0.14.0

8 years ago

0.13.0-beta.3

8 years ago

0.13.0-beta.2

8 years ago

0.13.0-beta.1

8 years ago

0.12.3

8 years ago

0.12.2

8 years ago

0.12.1

8 years ago

0.12.0

8 years ago

0.11.3

8 years ago

0.11.2

8 years ago

0.11.1

8 years ago

0.11.0

8 years ago

0.10.4

8 years ago

0.9.0

8 years ago

0.8.0

8 years ago

0.7.0

8 years ago

0.6.0

8 years ago

0.5.0

8 years ago

0.4.0

8 years ago

0.3.1

8 years ago

0.3.0

8 years ago

0.2.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago