https://github.com/Gozala/reducers
Tip revision: e297b9bbcdd8ebe7c98b5f9593ce7fc501951751 authored by Irakli Gozalishvili on 10 November 2012, 08:43:01 UTC
Version 1.0.3
Version 1.0.3
Tip revision: e297b9b
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 reduceInto(result, value) {
result.push(value)
return result
}, buffer || [])
}
module.exports = into