Socket
Socket
Sign inDemoInstall

flatten-array

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flatten-array - npm Package Compare versions

Comparing version 0.0.0 to 0.0.1

14

index.js
module.exports = flatten;
function flatten(list){
var result = [];
var result;
if(!Array.isArray(list)) return list;
result = [];
list.forEach(function(el){
result.push.apply(result, el);
if(!Array.isArray(el)) {
return result.push(el);
}
result.push.apply(result, flatten(el));
});

@@ -9,0 +19,0 @@

6

package.json
{
"name": "flatten-array",
"version": "0.0.0",
"version": "0.0.1",
"description": "Flattens nested arrays.",

@@ -13,7 +13,7 @@ "main": "index.js",

"repository": {
"url": "git@github.com:azer\/flatten-array.git",
"url": "git@github.com:azer/flatten-array.git",
"type": "git"
},
"author": "Azer Ko\u00e7ulu <azer@kodfabrik.com>",
"author": "Azer Koçulu <azer@kodfabrik.com>",
"license": "BSD"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc