cleaner-node
Advanced tools
Comparing version 1.1.7 to 1.2.0
{ | ||
"reject": [ | ||
"node-fetch", | ||
"eslint*" | ||
] | ||
} |
{ | ||
"name" : "cleaner-node", | ||
"version" : "1.1.7", | ||
"version" : "1.2.0", | ||
"description" : "Helpful utilities and scripts to make Node projects more legible and easier for the next developer to take over.", | ||
@@ -39,2 +39,5 @@ "main" : "src/index.js", | ||
"license": "Apache-2.0", | ||
"engines" : { | ||
"node" : ">=18.0.0" | ||
}, | ||
"bugs" : { | ||
@@ -52,3 +55,2 @@ "url": "https://github.com/FredLackey/cleaner-node/issues" | ||
"jsonwebtoken": "^9.0.2", | ||
"node-fetch" : "2.7.0", | ||
"rimraf" : "5.0.7", | ||
@@ -55,0 +57,0 @@ "semver" : "^7.6.2", |
@@ -1,6 +0,5 @@ | ||
const fetch = require('node-fetch'); | ||
const removePrefix = require('./remove-prefix'); | ||
const removeSuffix = require('./remove-suffix'); | ||
const removePrefix = require('./remove-prefix'); | ||
const removeSuffix = require('./remove-suffix'); | ||
const isValidString = require('./is-valid-string'); | ||
const isObject = require('./is-object'); | ||
const isObject = require('./is-object'); | ||
@@ -7,0 +6,0 @@ const IS_EMPTY_STRING_OKAY = true; |
@@ -18,3 +18,3 @@ const isValidString = require('./is-valid-string'); | ||
const first = str.slice(0, pos); | ||
if (str.length === first.length | separator.length === 0) { | ||
if (str.length === first.length || separator.length === 0) { | ||
return [first]; | ||
@@ -21,0 +21,0 @@ } |
@@ -1,4 +0,4 @@ | ||
const isValidString = require('./is-valid-string') | ||
const isNumber = require('./is-number') | ||
const isBoolean = require('./is-boolean') | ||
const isValidString = require('./is-valid-string'); | ||
const isNumber = require('./is-number'); | ||
const isBoolean = require('./is-boolean'); | ||
@@ -8,11 +8,12 @@ const toColumn = values => { | ||
const structure = [].concat(values).filter(x => (isNumber(x) || isBoolean(x) || isValidString(x))).map(value => { | ||
if (isValidString(value, true)) { | ||
return value; | ||
} | ||
if (isNumber(value)) { | ||
return `${value}`; | ||
} | ||
if (isBoolean(value)) { | ||
return value ? 'true' : 'false'; | ||
} | ||
return isValidString(value, true) | ||
? value | ||
: isNumber(value) | ||
? `${value}` | ||
: isBoolean(value) | ||
? value | ||
? 'true' | ||
: 'false' | ||
: undefined; | ||
}).map(value => ({ | ||
@@ -19,0 +20,0 @@ value, |
@@ -93,1 +93,6 @@ # Updates | ||
* add `toColumn` | ||
## v1.2.0 (7/8/2024) | ||
* remove `node-fetch` | ||
* require NodeJS 18 minimum |
178881
4
4786
- Removednode-fetch@2.7.0
- Removednode-fetch@2.7.0(transitive)
- Removedtr46@0.0.3(transitive)
- Removedwebidl-conversions@3.0.1(transitive)
- Removedwhatwg-url@5.0.0(transitive)