Catalog npm
Back to packageRELEASE DETAILS

0.3.2

npm

1-liners

Useful oneliners and shorthand functions

onelinersshorthands
Published18 Jun 2015
Direct dependencies11
Transitive dependenciesNot calculated

README

Current package documentation

MADE IN SWITZERLAND

Coverage Status Build Status Dependency Status npm version Stability: unstable Join the chat at https://gitter.im/1-liners/1-liners




1-liners



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.










Our decalogue

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.



1-liners


  1. Each function shall fit in one readable line of code
    – take a glimpse at the source and you know exactly what’s going on.
     

  2. Each function shall have no side-effects
    – you can use it with confidence.
     

  3. Each function shall have a fixed number of arguments
    – it’s dead easy to bind, curry and uncurry, apply partially, implode and explode.
     

  4. Each function shall deal with data in an immutable way
    – no more debugging nightmares.
     

  5. Each function shall take data as the last argument
    – this makes currying and composing new functions a breeze.
     

  6. Each function shall be in a separate micro-module
    – you only load/bundle the single 1-liner you need.
     

  7. Each function shall be thoroughly tested
    – 100% code coverage guaranteed. We even test if every function fits in one line!
     

  8. Each function shall have great documentation
    – the docs explain usage, present the source, and link to the specs.
     

  9. We shall provide functional versions of native object methods
    – like reduce(callback, array) for array.reduce(callback).
     

  10. We shall provide functional versions of language constructs
    – like plus(a, b) for a + b.
     

Usage

Install

$ npm install --save 1-liners

Usage in ES5

// The lightweight, recommended way:
var map = require('1-liners/map');

// Sometimes practical:
var map = require('1-liners').map;

Usage in ES 2015 (formerly ES6)

// The lightweight, recommended way:
import map from '1-liners/module/map';

// Sometimes practical:
import { map, filter } from '1-liners/module';

API

Checkout the documentation

Maintainers

created with gh-contributors-table

License

MIT © stoeffel tomekwi hemanth davidchase tristaaan

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 11

Native requirements
11 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
babel
Environment
{
  "local_name": "babel",
  "alias": false,
  "peer_metadata": null
}
^5.5.4development
coveralls
Environment
{
  "local_name": "coveralls",
  "alias": false,
  "peer_metadata": null
}
^2.11.2development
doctoc
Environment
{
  "local_name": "doctoc",
  "alias": false,
  "peer_metadata": null
}
github:tomekwi/doctoc#07d46c7development
dox
Environment
{
  "local_name": "dox",
  "alias": false,
  "peer_metadata": null
}
^0.8.0development
get-modules
Environment
{
  "local_name": "get-modules",
  "alias": false,
  "peer_metadata": null
}
^1.0.2development
husky
Environment
{
  "local_name": "husky",
  "alias": false,
  "peer_metadata": null
}
^0.8.1development
istanbul
Environment
{
  "local_name": "istanbul",
  "alias": false,
  "peer_metadata": null
}
^0.3.14development
mocha
Environment
{
  "local_name": "mocha",
  "alias": false,
  "peer_metadata": null
}
^2.2.5development
mocha-lcov-reporter
Environment
{
  "local_name": "mocha-lcov-reporter",
  "alias": false,
  "peer_metadata": null
}
0.0.2development
module-indexer
Environment
{
  "local_name": "module-indexer",
  "alias": false,
  "peer_metadata": null
}
^1.0.0development
nodangel
Environment
{
  "local_name": "nodangel",
  "alias": false,
  "peer_metadata": null
}
^1.3.8development

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "shasum": "b0a0a23e3430f95f1c2673f1cf76812aea48f96e",
  "tarball": "https://registry.npmjs.org/1-liners/-/1-liners-0.3.2.tgz",
  "integrity": "sha512-1oLCC6PQN2GqesTAr7S+irKQFprHsThSUEhqd8Y8s5efqWgaDpLSJhBXmnACsUxDXZKN9AlTe3zuCIeaoZsnpA==",
  "signatures": [
    {
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
      "sig": "MEUCIQDdku9viocSvjLW+1W3+29rUkj8EVwKdJxzxh/WEOZFsgIgFlDMuq+J7H/WcaexcdY+p5xauWoghaq1XUvzK+FlWHg="
    }
  ]
}

Repository

PENDING
1-liners/1-liners

Shared repository data · GitHub

License detected in repository
Not collected

Repository

PENDING
stoeffel/1-liners

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 17:55 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:e5884628b2db119d3704ec09f0d23dc04b21940f2bfc39a2ad3f60ebb450379e

Other collected versions

0.4.227 Jun0.4.03 Feb0.3.625 Aug0.3.52 Jul0.3.425 Jun0.3.324 JunView all collected versions →