Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@nathanfaucett/array-reduce

nathanfaucett11MIT0.0.1

applies a function against an accumulator and each value of the array (from left-to-right) to reduce it to a single value.

array-reduce, array-reduce.js

readme

array-reduce

applies a function against an accumulator and each value of the array (from left-to-right) to reduce it to a single value.

var arrayReduce = require("@nathanfaucett/array-reduce");


arrayReduce([0, 1, 2, 3, 4], function(currentValue, value) {
    return currentValue + value;
}) === 10;