Comparing version 1.0.2 to 1.0.3
@@ -7,2 +7,5 @@ # Change Log | ||
## [1.0.3] - 2018-03-28 | ||
- **Added** support for old browser | ||
## [1.0.2] - 2017-12-06 | ||
@@ -9,0 +12,0 @@ - Typo fix |
11
index.js
@@ -0,1 +1,7 @@ | ||
if (!Array.isArray) { | ||
Array.isArray = function(arg) { | ||
return Object.prototype.toString.call(arg) === '[object Array]'; | ||
}; | ||
} | ||
/** | ||
@@ -5,5 +11,6 @@ * Transforms a value into array | ||
* @param [checkNull=true] {boolean} if true returns empty array | ||
* @returns {*} | ||
* @returns [] | * | ||
*/ | ||
module.exports = (value, checkNull = true) => { | ||
module.exports = function (value, checkNull) { | ||
checkNull = checkNull === undefined ? true : checkNull; | ||
if ((checkNull && value === null) || value === undefined) | ||
@@ -10,0 +17,0 @@ return []; |
{ | ||
"name": "arrayme", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Transforms a value to an array", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2890
19