cleaner-node
Advanced tools
Comparing version 0.9.1 to 0.9.2
{ | ||
"name": "cleaner-node", | ||
"version": "0.9.1", | ||
"version": "0.9.2", | ||
"description": "Helpful utilities and scripts to make Node projects more legible and easier for the next developer to take over.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -40,1 +40,2 @@ # cleaner-node | ||
| 0.9.0 | 2020/05/14 | Add `files.readLines`. | | ||
| 0.9.1 | 2020/05/19 | Add `arrays.toResult`. | |
@@ -37,2 +37,12 @@ const strings = require('./strings'); | ||
const toResult = (itemOrItems, resultOrResults) => { | ||
if (isValid(itemOrItems, true) === isValid(resultOrResults, true)) { | ||
return resultOrResults; | ||
} | ||
if (isValid(itemOrItems, true)) { | ||
return toArray(resultOrResults); | ||
} | ||
return first(resultOrResults); | ||
}; | ||
module.exports = { | ||
@@ -48,3 +58,5 @@ count, | ||
init: toArray, | ||
parse: toArray | ||
parse: toArray, | ||
toResult | ||
}; |
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
72016
1817
41