@modernpoacher/deps 2.1.14 → 2.1.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -92,9 +92,7 @@ export function getArgs () {
92
92
  }
93
93
 
94
94
  function filter (v) {
95
- const s = v.trim()
96
-
97
- return Boolean(s)
95
+ return Boolean(v.trim())
98
96
  }
99
97
 
100
98
  export function use (key) {
@@ -103,7 +101,7 @@ export function use (key) {
103
101
  function write (v) {
104
102
  const s = v.trimEnd()
105
103
 
106
- log(s)
104
+ if (s) log(s)
107
105
  }
108
106
 
109
107
  return function use (value) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modernpoacher/deps",
3
- "version": "2.1.14",
3
+ "version": "2.1.16",
4
4
  "description": "Update NPM package dependencies from the command line",
5
5
  "keywords": [
6
6
  "deps",
@@ -60,9 +60,7 @@ log(`\`git\` (${VERSION} - ${PLATFORM}) is awake`)
60
60
  const trim = (v) => v.split(String.fromCharCode(10)).map((v) => v.trimEnd()).join(String.fromCharCode(10)).trim()
61
61
 
62
62
  function filter (v) {
63
- const s = v.trim()
64
-
65
- return Boolean(s)
63
+ return Boolean(v.trim())
66
64
  }
67
65
 
68
66
  export function getIsDirectory (directory) {
@@ -79,9 +77,7 @@ export function use (key) {
79
77
  const log = debug(`@modernpoacher/deps:${key}`)
80
78
 
81
79
  function write (v) {
82
- const s = v.trimEnd()
83
-
84
- log(s)
80
+ if (v.trim()) log(v.trimEnd())
85
81
  }
86
82
 
87
83
  return function use (value) {
@@ -105,9 +101,7 @@ export function out (key, directory) {
105
101
  }
106
102
 
107
103
  function write (v) {
108
- const s = v.trimEnd()
109
-
110
- log(s)
104
+ if (v.trim()) log(v.trimEnd())
111
105
  }
112
106
 
113
107
  return function out (value) {
@@ -131,9 +125,7 @@ export function err (key, directory) {
131
125
  }
132
126
 
133
127
  function write (v) {
134
- const s = v.trimEnd()
135
-
136
- log(s)
128
+ if (v.trim()) log(v.trimEnd())
137
129
  }
138
130
 
139
131
  return function err (value) {
package/src/index.mjs CHANGED
@@ -46,9 +46,7 @@ const log = debug('@modernpoacher/deps')
46
46
  log(`\`deps\` (${VERSION} - ${PLATFORM}) is awake`)
47
47
 
48
48
  function filter (v) {
49
- const s = v.trim()
50
-
51
- return Boolean(s)
49
+ return Boolean(v.trim())
52
50
  }
53
51
 
54
52
  export function use (key) {
@@ -57,7 +55,7 @@ export function use (key) {
57
55
  function write (v) {
58
56
  const s = v.trimEnd()
59
57
 
60
- log(s)
58
+ if (s) log(s)
61
59
  }
62
60
 
63
61
  return function use (value) {