Comparing version 0.10.1 to 0.10.2
@@ -11,3 +11,3 @@ { | ||
], | ||
"version": "0.10.1", | ||
"version": "0.10.2", | ||
"license": "MIT", | ||
@@ -35,2 +35,7 @@ "files": [ | ||
}, | ||
"nyc": { | ||
"include": [ | ||
"src/*.js" | ||
] | ||
}, | ||
"babel": { | ||
@@ -37,0 +42,0 @@ "presets": [ |
@@ -5,3 +5,3 @@ # bukk 🐐 | ||
[![dependencies](https://david-dm.org/christianhg/bukk.svg)](https://david-dm.org/christianhg/bukk) | ||
[![Dependencies](https://david-dm.org/christianhg/bukk.svg)](https://david-dm.org/christianhg/bukk) | ||
[![npm module](https://badge.fury.io/js/bukk.svg)](https://www.npmjs.org/package/bukk) | ||
@@ -29,10 +29,19 @@ [![Build Status](https://travis-ci.org/christianhg/bukk.svg?branch=master)](https://travis-ci.org/christianhg/bukk) | ||
- **[No dependencies](https://david-dm.org/christianhg/bukk)** | ||
- **[Great code coverage](https://coveralls.io/github/christianhg/bukk)** | ||
## Examples | ||
```js | ||
const incList = B.map(B.inc) | ||
const incCollection = B.map(B.inc) | ||
incList([1, 2, 3]) | ||
incCollection([1, 2, 3]) | ||
// => [2, 3, 4] | ||
incCollection(new Set([1, 2, 3])) | ||
// => Set {2, 3, 4} | ||
``` | ||
```js | ||
const isFoo = B.equals('foo') | ||
@@ -43,4 +52,43 @@ const allIsFoo = B.all(isFoo) | ||
// => true | ||
allIsFoo(['foo', 'bar', 'baz']) | ||
// => false | ||
``` | ||
```js | ||
const takeTwo = B.take(2) | ||
takeTwo(new Map([[1, 'a'], [2, 'b'], [3, 'c']])) | ||
// => Map { 1 => 'a', 2 => 'b' } | ||
takeTwo('foobar') | ||
// => 'fo' | ||
``` | ||
```js | ||
const double = B.multiply(2) | ||
const addFive = B.add(5) | ||
const incDoubleAndAddFive = B.compose(addFive, double, B.inc) | ||
incDoubleAndAddFive(1) | ||
// => 9 | ||
``` | ||
```js | ||
const sqrtOfProduct = B.pipe(B.multiply, Math.sqrt) | ||
sqrtOfProduct(3, 12) | ||
// => 6 | ||
``` | ||
```js | ||
const propertyIs = (v, p, o) => B.equals(o[p], v) | ||
const isDone = B.curry(propertyIs)(true, 'done') | ||
const getFinished = B.filter(isDone) | ||
const processes = [{process: 'a', done: false}, {process: 'b', done: true}, {process: 'c', done: false}] | ||
getFinished(processes) | ||
// => [{process: 'b', done: true}] | ||
``` | ||
## Installation | ||
@@ -47,0 +95,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
27136
144