npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

redash

v0.23.0

Published

A better Standard Library for JavaScript

Downloads

125

Readme

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

Category | Redash | Ramda | Lodash | Lodash/FP --------------- | ------- | ----- | --------- | --------- Minified (kb) | 12.4 | 44.7 | 71.4 | 71.4 100% Immutable | Yes | Yes | No | Yes Auto-Curry | Yes | Yes | No | Yes Object Equality | Value | Value | Reference | Reference IE 9+ | Yes | Yes | Yes | Yes