Comparing version 1.0.1 to 1.1.0
@@ -68,6 +68,11 @@ 'use strict'; | ||
var ʕᵔᴥᵔʔ = function ʕᵔᴥᵔʔ() { | ||
return this.output; | ||
}; | ||
return { | ||
ʕʘ̅͜ʘ̅ʔ: ʕʘ̅͜ʘ̅ʔ, | ||
Ƹ̵̡Ӝ̵̨̄Ʒ: Ƹ̵̡Ӝ̵̨̄Ʒ, | ||
ಠ_ಠ: ಠ_ಠ | ||
ಠ_ಠ: ಠ_ಠ, | ||
ʕᵔᴥᵔʔ: ʕᵔᴥᵔʔ | ||
}; | ||
@@ -74,0 +79,0 @@ }; |
{ | ||
"name": "bearray", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"description": "A fun package with chainable higher order functions", | ||
@@ -5,0 +5,0 @@ "author": "Lukas Aichbauer <rudolfson.junior@gmail.com>", |
@@ -22,3 +22,4 @@ # bearray | ||
- [map](#map) | ||
- [filter](#reduce) | ||
- [reduce](#reduce) | ||
- [getValue](#getValue) | ||
@@ -37,3 +38,3 @@ ### filter | ||
ᕕ·ᐛ·ᕗ.output // [2, 4] | ||
ᕕ·ᐛ·ᕗ.ʕᵔᴥᵔʔ() // [2, 4] | ||
``` | ||
@@ -53,3 +54,3 @@ | ||
ᕕ·ᐛ·ᕗ.output // [2, 4, 6, 8] | ||
ᕕ·ᐛ·ᕗ.ʕᵔᴥᵔʔ() // [2, 4, 6, 8] | ||
``` | ||
@@ -70,3 +71,16 @@ | ||
ᕕ·ᐛ·ᕗ.output // [10] | ||
ᕕ·ᐛ·ᕗ.ʕᵔᴥᵔʔ() // [10] | ||
``` | ||
### getValue | ||
> ʕᵔᴥᵔʔ | ||
Get the value at the end of some chained operations (see other functions as well). | ||
```js | ||
import { ʕ·ᴥ·ʔ } from 'bearray'; | ||
const ᕕ·ᐛ·ᕗ = ʕ·ᴥ·ʔ([1, 2, 3, 4]); | ||
ᕕ·ᐛ·ᕗ.ʕᵔᴥᵔʔ() // [1, 2, 3, 4] | ||
``` |
@@ -41,3 +41,3 @@ import test from 'ava'; | ||
t.deepEqual(reduce.output, [10]); | ||
t.deepEqual(reduce.ʕᵔᴥᵔʔ(), [10]); | ||
}); | ||
@@ -48,3 +48,3 @@ | ||
t.deepEqual(filter.output, [2, 4]); | ||
t.deepEqual(filter.ʕᵔᴥᵔʔ(), [2, 4]); | ||
}); | ||
@@ -55,3 +55,3 @@ | ||
t.deepEqual(map.output, [1, 4, 9, 16]); | ||
t.deepEqual(map.ʕᵔᴥᵔʔ(), [1, 4, 9, 16]); | ||
}); | ||
@@ -64,3 +64,3 @@ | ||
t.deepEqual(map.output, [6]); | ||
t.deepEqual(map.ʕᵔᴥᵔʔ(), [6]); | ||
}); | ||
@@ -67,0 +67,0 @@ |
144065
117
83