https://github.com/Gozala/reducers
Tip revision: 5d6ad72e59e1d2edc2c8275009d81b1e8a083716 authored by Irakli Gozalishvili on 25 October 2012, 02:53:20 UTC
Version 0.1.3
Version 0.1.3
Tip revision: 5d6ad72
into.js
"use strict";
var reduce = require("./reduce")
function into(source, buffer) {
/**
Adds items of given `reducible` into
given `array` or a new empty one if omitted.
**/
return reduce(source, function(result, value) {
result.push(value)
return result
}, buffer || [])
}
module.exports = into