aneka 0.11.1 → 0.13.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 CHANGED
@@ -1,10 +1,17 @@
1
1
  # Changes
2
2
 
3
+ ## 2026-03-10
4
+
5
+ - [0.13.0] Add ```textToArray```
6
+
7
+ ## 2026-02-20
8
+
9
+ - [0.12.0] Add ```without()```
10
+
3
11
  ## 2026-01-18
4
12
 
5
13
  - [0.11.1] ```parseArgsArgv()``` now accepts an object as its parameter
6
14
 
7
-
8
15
  ## 2025-12-25
9
16
 
10
17
  - [0.10.0] Add ```parseKvString()```
package/index.js CHANGED
@@ -29,6 +29,8 @@ 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'
33
+ import textToArray from './src/text-to-array.js'
32
34
 
33
35
  export {
34
36
  arrangeArray,
@@ -62,7 +64,9 @@ export {
62
64
  secToHms,
63
65
  setImmediate,
64
66
  shim,
65
- titleize
67
+ textToArray,
68
+ titleize,
69
+ without
66
70
  }
67
71
 
68
72
  export default {
@@ -96,5 +100,7 @@ export default {
96
100
  round,
97
101
  secToHms,
98
102
  shim,
99
- titleize
103
+ textToArray,
104
+ titleize,
105
+ without
100
106
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aneka",
3
- "version": "0.11.1",
3
+ "version": "0.13.0",
4
4
  "description": "Some usefull function helper for daily use",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -0,0 +1,11 @@
1
+ import isEmpty from 'lodash-es/isEmpty.js'
2
+
3
+ function textToArray (text) {
4
+ const lines = text.trim().split('\n').map(line => line.trim())
5
+ return lines.filter(c => {
6
+ const line = c.split('#')[0].trim()
7
+ return !isEmpty(line)
8
+ })
9
+ }
10
+
11
+ export default textToArray
package/src/without.js ADDED
@@ -0,0 +1,8 @@
1
+ import w from 'lodash-es/without.js'
2
+
3
+ function without (arr = [], ...params) {
4
+ params.push(null, undefined, '')
5
+ return w(arr, ...params)
6
+ }
7
+
8
+ export default without