aneka 0.12.0 → 0.13.1

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,5 +1,10 @@
1
1
  # Changes
2
2
 
3
+ ## 2026-03-10
4
+
5
+ - [0.13.0] Add ```textToArray```
6
+ - [0.13.1] Bug fix in ```index.js```
7
+
3
8
  ## 2026-02-20
4
9
 
5
10
  - [0.12.0] Add ```without()```
package/index.js CHANGED
@@ -30,6 +30,7 @@ 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
32
  import without from './src/without.js'
33
+ import textToArray from './src/text-to-array.js'
33
34
 
34
35
  export {
35
36
  arrangeArray,
@@ -63,6 +64,7 @@ export {
63
64
  secToHms,
64
65
  setImmediate,
65
66
  shim,
67
+ textToArray,
66
68
  titleize,
67
69
  without
68
70
  }
@@ -98,6 +100,7 @@ export default {
98
100
  round,
99
101
  secToHms,
100
102
  shim,
103
+ textToArray,
101
104
  titleize,
102
105
  without
103
106
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aneka",
3
- "version": "0.12.0",
3
+ "version": "0.13.1",
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