aneka 0.11.0 → 0.12.0
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.
- package/CHANGES.md +5 -1
- package/index.js +5 -2
- package/package.json +1 -1
- package/src/parse-args-argv.js +6 -4
- package/src/without.js +8 -0
package/CHANGES.md
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
# Changes
|
|
2
2
|
|
|
3
|
+
## 2026-02-20
|
|
4
|
+
|
|
5
|
+
- [0.12.0] Add ```without()```
|
|
6
|
+
|
|
3
7
|
## 2026-01-18
|
|
4
8
|
|
|
5
|
-
- [0.11.
|
|
9
|
+
- [0.11.1] ```parseArgsArgv()``` now accepts an object as its parameter
|
|
6
10
|
|
|
7
11
|
## 2025-12-25
|
|
8
12
|
|
package/index.js
CHANGED
|
@@ -29,6 +29,7 @@ import randomRange from './src/random-range.js'
|
|
|
29
29
|
import generateId from './src/generate-id.js'
|
|
30
30
|
import fillObject from './src/fill-object.js'
|
|
31
31
|
import parseKvString from './src/parse-kv-string.js'
|
|
32
|
+
import without from './src/without.js'
|
|
32
33
|
|
|
33
34
|
export {
|
|
34
35
|
arrangeArray,
|
|
@@ -62,7 +63,8 @@ export {
|
|
|
62
63
|
secToHms,
|
|
63
64
|
setImmediate,
|
|
64
65
|
shim,
|
|
65
|
-
titleize
|
|
66
|
+
titleize,
|
|
67
|
+
without
|
|
66
68
|
}
|
|
67
69
|
|
|
68
70
|
export default {
|
|
@@ -96,5 +98,6 @@ export default {
|
|
|
96
98
|
round,
|
|
97
99
|
secToHms,
|
|
98
100
|
shim,
|
|
99
|
-
titleize
|
|
101
|
+
titleize,
|
|
102
|
+
without
|
|
100
103
|
}
|
package/package.json
CHANGED
package/src/parse-args-argv.js
CHANGED
|
@@ -50,14 +50,16 @@ async function parseWithYargs (cwd) {
|
|
|
50
50
|
* Parse program arguments (args) & options (argv)
|
|
51
51
|
*
|
|
52
52
|
* @async
|
|
53
|
-
* @param {
|
|
54
|
-
* @param {
|
|
55
|
-
* @param {
|
|
53
|
+
* @param {Object} [options={}] - Options object
|
|
54
|
+
* @param {function(Object): Object} [options.sanitizer] - If provided, result will be sanitized with this function
|
|
55
|
+
* @param {boolean} [options.useParser] - If ```true```, skip {@link https://github.com/yargs/yargs|yargs}
|
|
56
|
+
* @param {string} [options.cwd] - If provided, current working directory is set to this
|
|
56
57
|
* @returns {{args: Array, argv: Object}} An object containing ```args``` and ```argv```
|
|
57
58
|
* @see App#args
|
|
58
59
|
* @see App#argv
|
|
59
60
|
*/
|
|
60
|
-
async function parseArgsArgv (
|
|
61
|
+
async function parseArgsArgv (options = {}) {
|
|
62
|
+
let { sanitizer, useParser, cwd } = options
|
|
61
63
|
if (!useParser) useParser = find(process.argv, a => a.startsWith('--spawn'))
|
|
62
64
|
let argv = useParser ? await parseWithParser() : await parseWithYargs(cwd)
|
|
63
65
|
const args = argv._
|