Initial commit
This commit is contained in:
38
themes/keepit/node_modules/reduce/README.md
generated
vendored
Normal file
38
themes/keepit/node_modules/reduce/README.md
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
# reduce [![build status][travis-svg]][travis-url]
|
||||
|
||||
## Example
|
||||
|
||||
Like `Array.prototype.reduce` but works on Object and accepts optional
|
||||
`this` value
|
||||
|
||||
``` js
|
||||
var reduce = require("reduce")
|
||||
|
||||
reduce({
|
||||
key: "value"
|
||||
, key2: "value2"
|
||||
, ...
|
||||
}, function (acc, value, key) {
|
||||
/* real code */
|
||||
acc[key] = value
|
||||
return acc
|
||||
}, {
|
||||
this: "context"
|
||||
}, {
|
||||
initial: "value"
|
||||
})
|
||||
```
|
||||
|
||||
## Installation
|
||||
|
||||
`npm install reduce`
|
||||
|
||||
## Contributors
|
||||
|
||||
- Raynos
|
||||
|
||||
## MIT Licenced
|
||||
|
||||
[travis-svg]: https://secure.travis-ci.org/Raynos/reduce.svg
|
||||
[travis-url]: https://travis-ci.org/Raynos/reduce
|
||||
|
||||
Reference in New Issue
Block a user