Sha256: 69d5763ad59ce6caba72556398e4468c90de09cfae19b05008804014820819f1
Contents?: true
Size: 418 Bytes
Versions: 50
Compression:
Stored size: 418 Bytes
Contents
/*! * arr-flatten <https://github.com/jonschlinkert/arr-flatten> * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. */ 'use strict'; module.exports = function (arr) { return flat(arr, []); }; function flat(arr, res) { var i = 0, cur; var len = arr.length; for (; i < len; i++) { cur = arr[i]; Array.isArray(cur) ? flat(cur, res) : res.push(cur); } return res; }
Version data entries
50 entries across 49 versions & 18 rubygems