New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

arraywrap

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

arraywrap - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

26

arraywrap.js

@@ -1,11 +0,19 @@

function arrayWrap(value) {
if (arguments.length) {
return Array.isArray(value) ? value : [value];
(function () {
var isArray = Array.isArray || function (value) {
return Object.prototype.toString.call(value) == '[object Array]';
};
function arrayWrap(value) {
if (arguments.length) {
return isArray(value) ? value : [value];
} else {
return [];
}
}
if (typeof module !== 'undefined') {
module.exports = arrayWrap;
} else {
return [];
this.arrayWrap = arrayWrap;
}
}
if (typeof module !== 'undefined') {
module.exports = arrayWrap;
}
})();
{
"name": "arraywrap",
"version": "0.1.0",
"version": "0.2.0",
"description": "if it's not an array, wrap it in an array. if it's already an array, do nothing.",

@@ -5,0 +5,0 @@ "main": "arraywrap.js",

@@ -34,2 +34,2 @@ array wrap dot js

If you need to support browsers that don't have `Array.isArray` (like IE8 and below), you'll need to [polyfill it](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray#Polyfill).
This should support environments that don't have `Array.isArray` (like IE8 and below).
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