Observed since 20 Oct, 17:55 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Useful oneliners and shorthand functions
MADE IN SWITZERLAND
Functional tools that couldn’t be simpler.
We’re proud to present 1-liners – a dead simple functional utility belt. 137 one-liner functions (and counting). Each hand-crafted with love and attention.
You get a product of top-quality functional programming craftmanship. Each function follows the KISS principle, which we’ve broken down into ten strict rules.
We always follow them. You have our word.
Each function shall fit in one readable line of code
– take a glimpse at the source and you know exactly what’s going on.
Each function shall have no side-effects
– you can use it with confidence.
Each function shall have a fixed number of arguments
– it’s dead easy to bind, curry and uncurry, apply partially, implode and explode.
Each function shall deal with data in an immutable way
– no more debugging nightmares.
Each function shall take data as the last argument
– this makes currying and composing new functions a breeze.
Each function shall be in a separate micro-module
– you only load/bundle the single 1-liner you need.
Each function shall be thoroughly tested
– 100% code coverage guaranteed. We even test if every function fits in one line!
Each function shall have great documentation
– the docs explain usage, present the source, and link to the specs.
We shall provide functional versions of native object methods
– like reduce(callback, array) for array.reduce(callback).
We shall provide functional versions of language constructs
– like plus(a, b) for a + b.
$ npm install --save 1-liners
// The lightweight, recommended way:
var map = require('1-liners/map');
// Sometimes practical:
var map = require('1-liners').map;
// The lightweight, recommended way:
import map from '1-liners/module/map';
// Sometimes practical:
import { map, filter } from '1-liners/module';
Checkout the documentation
created with gh-contributors-table
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.4.2Registry latest | 27 Jun 2019 | 14 | |
| 0.4.0 | 3 Feb 2016 | 14 | |
| 0.3.6 | 25 Aug 2015 | 14 | |
| 0.3.5 | 2 Jul 2015 | 13 | |
| 0.3.4 | 25 Jun 2015 | 13 | |
| 0.3.3 | 24 Jun 2015 | 13 | |
| 0.3.2 | 18 Jun 2015 | 11 | |
| 0.3.1 | 17 Jun 2015 | 11 | |
| 0.3.0 | 11 Jun 2015 | 11 | |
| 0.2.10 | 6 Jun 2015 | 11 | |
| 0.2.9 | 5 Jun 2015 | 11 | |
| 0.2.7 | 25 May 2015 | 9 | |
| 0.2.6 | 21 May 2015 | 9 | |
| 0.2.5 | 19 May 2015 | 9 | |
| 0.2.3 | 16 May 2015 | 9 | |
| 0.2.2 | 12 May 2015 | 9 | |
| 0.2.1 | 11 May 2015 | 9 | |
| 0.2.0 | 11 May 2015 | 9 | |
| 0.1.4 | 4 May 2015 | 7 | |
| 0.1.3 | 3 May 2015 | 7 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 17:55 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:e433e81c8459179a7aa28b6a86c7421812bc3662fd0deec52d8bc48805bb9df6