Package detail

reduce

Raynos547.8kMIT1.0.3

A better [].reduce

readme

reduce build status

Example

Like Array.prototype.reduce but works on Object and accepts optional this value

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

changelog

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

v1.0.3 - 2024-05-23

Commits

  • [Tests] migrate to GHA 285b9c2
  • [meta] add autochangelog settings 336d47c
  • [meta] use auto-changelog 2c84bba
  • [meta] clean up some package.json metadata 63b6956
  • [Tests] use nyc for coverage e1c54bf
  • [Dev Deps] update @ljharb/eslint-config, eslint, tape 311270e
  • [Dev Deps] list aud explicitly e5080e1
  • [meta] add SECURITY.md 4bb7107
  • [meta] add missing engines.node fe78d29
  • [Deps] update object-keys 52f927b

v1.0.2 - 2019-03-01

Commits

  • [Tests] test on all the nodes; use nvm install-latest-npm 55bb533
  • [Tests] remove jscs, add eslint; run linting as part of pretest 1fa2005
  • Add semicolons. 48e19b2
  • Use multiple var statements and comma-last. 2367ab1
  • Update tape, covert, jscs, object-keys e11f0ba
  • Consistent quotes. c12d433
  • [Dev Deps] update tape, jscs 34fa499
  • Test up to io.js v2.3 d2e9f7b
  • Only apps should have lockfiles 0903a75
  • All grade A-supported node/iojs versions now ship with an npm that understands ^. c929e4f
  • [Dev Deps] update covert, jscs, tape 83286af
  • [Docs] rip testling 729f840
  • Update object-keys, tape, jscs 86abca7
  • Run travis-ci tests on node v0.12; speed up builds; allow 0.8 failures. f97e829
  • Naming testling-ci URLs in README 5ff28c4
  • Naming travis-ci URLs in README a261554
  • Test up to io.js v3.0 214961d
  • Update object-keys, tape 81fda4b
  • [Tests] use npx aud (ie, npm audit) b0f0c95
  • [Deps] update object-keys dca9528
  • [Dev Deps] update tape ced867a
  • Update covert 3e2c016
  • Updating jscs cbd0fb7
  • Updating tape 7d2f379
  • Updating object-keys c6e82ed
  • Updating jscs e386d79
  • Updating jscs 931357d

v1.0.1 - 2014-08-26

Commits

  • Adding npm run lint cfbb90e
  • Use SVG instead of PNG badge 857bf4c
  • Run linter as part of tests f3bc7f3
  • Run code coverage as part of tests. d162539

v1.0.0 - 2014-08-11

Merged

  • Updating dependencies #8
  • Argument length #7
  • Forgot to fix these tests #6

Commits

v0.1.2 - 2013-05-23

Commits

v0.1.1 - 2013-05-10

Merged

  • use tape instead of tap #4
  • Use testling #2
  • Adding node 0.10 #3

Commits

v0.1.0 - 2012-10-02

Commits