aneka 0.17.6 → 0.17.7
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/.jsdoc.conf.json +0 -0
- package/CHANGES.md +87 -83
- package/LICENSE +21 -21
- package/README.md +63 -63
- package/docs/arrange-array.js.html +0 -0
- package/docs/create-class.js.html +0 -0
- package/docs/current-loc.js.html +0 -0
- package/docs/data/search.json +0 -0
- package/docs/defaults-deep.js.html +0 -0
- package/docs/delay.js.html +0 -0
- package/docs/extract-text.js.html +0 -0
- package/docs/fill-object.js.html +0 -0
- package/docs/filter-duplicate.js.html +0 -0
- package/docs/filter-index.js.html +0 -0
- package/docs/fonts/Inconsolata-Regular.ttf +0 -0
- package/docs/fonts/OpenSans-Regular.ttf +0 -0
- package/docs/fonts/WorkSans-Bold.ttf +0 -0
- package/docs/format-text.js.html +0 -0
- package/docs/generate-id.js.html +0 -0
- package/docs/get-caller-filename.js.html +0 -0
- package/docs/get-global-module-dir.js.html +0 -0
- package/docs/get-index.js.html +0 -0
- package/docs/get-key-by-value.js.html +0 -0
- package/docs/global.html +0 -0
- package/docs/includes.js.html +0 -0
- package/docs/index.html +0 -0
- package/docs/is-class.js.html +0 -0
- package/docs/is-set.js.html +0 -0
- package/docs/merge-objects-by-key.js.html +0 -0
- package/docs/paginate.js.html +0 -0
- package/docs/parse-args-argv.js.html +0 -0
- package/docs/parse-duration.js.html +0 -0
- package/docs/parse-env.js.html +0 -0
- package/docs/parse-kv-string.js.html +0 -0
- package/docs/parse-object.js.html +0 -0
- package/docs/pascal-case.js.html +0 -0
- package/docs/random-range.js.html +0 -0
- package/docs/resolve-path.js.html +0 -0
- package/docs/round.js.html +0 -0
- package/docs/scripts/core.js +0 -0
- package/docs/scripts/core.min.js +0 -0
- package/docs/scripts/resize.js +0 -0
- package/docs/scripts/search.js +0 -0
- package/docs/scripts/search.min.js +5 -5
- package/docs/scripts/third-party/Apache-License-2.0.txt +0 -0
- package/docs/scripts/third-party/fuse.js +0 -0
- package/docs/scripts/third-party/hljs-line-num-original.js +0 -0
- package/docs/scripts/third-party/hljs-line-num.js +0 -0
- package/docs/scripts/third-party/hljs-original.js +0 -0
- package/docs/scripts/third-party/hljs.js +0 -0
- package/docs/scripts/third-party/popper.js +0 -0
- package/docs/scripts/third-party/tippy.js +0 -0
- package/docs/scripts/third-party/tocbot.js +0 -0
- package/docs/scripts/third-party/tocbot.min.js +0 -0
- package/docs/sec-to-hms.js.html +0 -0
- package/docs/set-immediate.js.html +0 -0
- package/docs/set-interval.js.html +0 -0
- package/docs/set-timeout.js.html +0 -0
- package/docs/shim.js.html +0 -0
- package/docs/static/bitcoin.jpeg +0 -0
- package/docs/styles/clean-jsdoc-theme-base.css +0 -0
- package/docs/styles/clean-jsdoc-theme-dark.css +0 -0
- package/docs/styles/clean-jsdoc-theme-light.css +0 -0
- package/docs/styles/clean-jsdoc-theme-scrollbar.css +0 -0
- package/docs/styles/clean-jsdoc-theme-without-scrollbar.min.css +0 -0
- package/docs/styles/clean-jsdoc-theme.min.css +0 -0
- package/docs/text-to-array.js.html +0 -0
- package/docs/titleize.js.html +0 -0
- package/docs/without.js.html +0 -0
- package/index.js +119 -119
- package/package.json +48 -48
- package/src/arrange-array.js +25 -25
- package/src/create-class.js +35 -35
- package/src/current-loc.js +0 -0
- package/src/defaults-deep.js +20 -20
- package/src/delay.js +19 -19
- package/src/extract-text.js +23 -23
- package/src/fill-object.js +17 -17
- package/src/filter-duplicate.js +26 -26
- package/src/filter-index.js +17 -17
- package/src/format-text.js +88 -88
- package/src/generate-id.js +35 -35
- package/src/get-caller-filename.js +25 -25
- package/src/get-global-module-dir.js +24 -20
- package/src/get-index.js +15 -15
- package/src/get-key-by-value.js +12 -12
- package/src/includes.js +18 -18
- package/src/is-class.js +13 -13
- package/src/is-set.js +11 -11
- package/src/log.js +19 -19
- package/src/merge-objects-by-key.js +24 -24
- package/src/paginate.js +45 -45
- package/src/parse-args-argv.js +0 -0
- package/src/parse-duration.js +14 -14
- package/src/parse-env.js +0 -0
- package/src/parse-kv-string.js +21 -21
- package/src/parse-object.js +76 -76
- package/src/pascal-case.js +14 -14
- package/src/random-range.js +15 -15
- package/src/resolve-path.js +0 -0
- package/src/round.js +13 -13
- package/src/sec-to-hms.js +27 -27
- package/src/set-immediate.js +12 -12
- package/src/set-interval.js +56 -56
- package/src/set-timeout.js +34 -34
- package/src/shim.js +28 -28
- package/src/text-to-array.js +17 -17
- package/src/titleize.js +37 -37
- package/src/without.js +18 -18
- package/test/arrange-array.js +41 -41
- package/test/create-class.js +33 -33
- package/test/current-loc.js +24 -24
- package/test/defaults-deep.js +19 -19
- package/test/delay.js +17 -17
- package/test/extract-text.js +17 -17
- package/test/fill-object.js +17 -17
- package/test/filter-duplicate.js +19 -19
- package/test/filter-index.js +17 -17
- package/test/format-text.js +26 -26
- package/test/generate-id.js +28 -28
- package/test/get-caller-filename.js +22 -22
- package/test/get-global-module-dir.js +51 -51
- package/test/get-index.js +17 -17
- package/test/get-key-by-value.js +17 -17
- package/test/includes.js +18 -18
- package/test/is-class.js +19 -19
- package/test/is-set.js +21 -21
- package/test/log.js +47 -47
- package/test/merge-objects-by-key.js +19 -19
- package/test/paginate.js +24 -24
- package/test/parse-args-argv.js +63 -63
- package/test/parse-duration.js +18 -18
- package/test/parse-env.js +35 -35
- package/test/parse-kv-string.js +17 -17
- package/test/parse-object.js +30 -30
- package/test/pascal-case.js +18 -18
- package/test/random-range.js +21 -21
- package/test/resolve-path.js +22 -22
- package/test/round.js +19 -19
- package/test/sec-to-hms.js +18 -18
- package/test/set-immediate.js +17 -17
- package/test/set-interval.js +196 -196
- package/test/set-timeout.js +120 -120
- package/test/shim.js +34 -34
- package/test/text-to-array.js +18 -18
- package/test/titleize.js +27 -27
- package/test/without.js +17 -17
package/.jsdoc.conf.json
CHANGED
|
File without changes
|
package/CHANGES.md
CHANGED
|
@@ -1,83 +1,87 @@
|
|
|
1
|
-
# Changes
|
|
2
|
-
|
|
3
|
-
## 2026-
|
|
4
|
-
|
|
5
|
-
- [0.17.
|
|
6
|
-
|
|
7
|
-
## 2026-08-
|
|
8
|
-
|
|
9
|
-
- [0.17.
|
|
10
|
-
|
|
11
|
-
-
|
|
12
|
-
|
|
13
|
-
- [0.17.
|
|
14
|
-
- [0.17.
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
- [0.
|
|
19
|
-
|
|
20
|
-
## 2026-
|
|
21
|
-
|
|
22
|
-
- [0.
|
|
23
|
-
|
|
24
|
-
## 2026-06-
|
|
25
|
-
|
|
26
|
-
- [0.
|
|
27
|
-
|
|
28
|
-
## 2026-
|
|
29
|
-
|
|
30
|
-
- [0.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
- [0.
|
|
36
|
-
|
|
37
|
-
## 2026-
|
|
38
|
-
|
|
39
|
-
- [0.
|
|
40
|
-
|
|
41
|
-
##
|
|
42
|
-
|
|
43
|
-
- [0.
|
|
44
|
-
|
|
45
|
-
## 2025-12-
|
|
46
|
-
|
|
47
|
-
- [0.
|
|
48
|
-
|
|
49
|
-
## 2025-12-
|
|
50
|
-
|
|
51
|
-
- [0.
|
|
52
|
-
|
|
53
|
-
-
|
|
54
|
-
|
|
55
|
-
- [0.6.0]
|
|
56
|
-
- [0.6.0] Add `
|
|
57
|
-
- [0.6.0] Add `
|
|
58
|
-
- [0.
|
|
59
|
-
- [0.
|
|
60
|
-
- [0.
|
|
61
|
-
- [0.
|
|
62
|
-
- [0.7.
|
|
63
|
-
- [0.
|
|
64
|
-
- [0.
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
- [0.
|
|
69
|
-
|
|
70
|
-
## 2025-12-
|
|
71
|
-
|
|
72
|
-
- [0.
|
|
73
|
-
|
|
74
|
-
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
- [0.
|
|
79
|
-
|
|
80
|
-
## 2025-12-
|
|
81
|
-
|
|
82
|
-
- [0.2.
|
|
83
|
-
|
|
1
|
+
# Changes
|
|
2
|
+
|
|
3
|
+
## 2026-09-04
|
|
4
|
+
|
|
5
|
+
- [0.17.7] Bug fix in `getGlobalModuleDir()`
|
|
6
|
+
|
|
7
|
+
## 2026-08-20
|
|
8
|
+
|
|
9
|
+
- [0.17.6] Bug fix in `setInterval()`
|
|
10
|
+
|
|
11
|
+
## 2026-08-06
|
|
12
|
+
|
|
13
|
+
- [0.17.0] Add `setTimeout()`
|
|
14
|
+
- [0.17.0] Add `setInterval()`
|
|
15
|
+
- [0.17.1] Add `runFirst` option to `setInterval()`
|
|
16
|
+
- [0.17.2] Drop `runFirst` option from `setInterval()`
|
|
17
|
+
- [0.17.4] Update documentations & tests
|
|
18
|
+
- [0.17.5] Bug fix in `setInterval()`: Ensure lock file exists before acquiring lock
|
|
19
|
+
|
|
20
|
+
## 2026-07-01
|
|
21
|
+
|
|
22
|
+
- [0.16.0] Add `getGlobalModuleDir()`
|
|
23
|
+
|
|
24
|
+
## 2026-06-24
|
|
25
|
+
|
|
26
|
+
- [0.15.0] Add documentations & tests
|
|
27
|
+
|
|
28
|
+
## 2026-06-01
|
|
29
|
+
|
|
30
|
+
- [0.14.0] Add `getCallerFilename`
|
|
31
|
+
|
|
32
|
+
## 2026-03-10
|
|
33
|
+
|
|
34
|
+
- [0.13.0] Add `textToArray`
|
|
35
|
+
- [0.13.1] Bug fix in `index.js`
|
|
36
|
+
|
|
37
|
+
## 2026-02-20
|
|
38
|
+
|
|
39
|
+
- [0.12.0] Add `without()`
|
|
40
|
+
|
|
41
|
+
## 2026-01-18
|
|
42
|
+
|
|
43
|
+
- [0.11.1] `parseArgsArgv()` now accepts an object as its parameter
|
|
44
|
+
|
|
45
|
+
## 2025-12-25
|
|
46
|
+
|
|
47
|
+
- [0.10.0] Add `parseKvString()`
|
|
48
|
+
|
|
49
|
+
## 2025-12-19
|
|
50
|
+
|
|
51
|
+
- [0.9.0] Add `fillObject()`
|
|
52
|
+
|
|
53
|
+
## 2025-12-13
|
|
54
|
+
|
|
55
|
+
- [0.6.0] Export functions as named export as well as default export
|
|
56
|
+
- [0.6.0] Add `setImmediate()`
|
|
57
|
+
- [0.6.0] Add `formatText()`
|
|
58
|
+
- [0.6.0] Add `resolvePath()`
|
|
59
|
+
- [0.6.0] Add `parseEnv()`
|
|
60
|
+
- [0.6.0] Add `parseArgsArgv()`
|
|
61
|
+
- [0.6.0] Add `parseDuration()`
|
|
62
|
+
- [0.7.0] Add `parseObject()`
|
|
63
|
+
- [0.7.1] Bug fix in `parseObject()`
|
|
64
|
+
- [0.7.2] Bug fix in `parseArgsArgv()`
|
|
65
|
+
- [0.7.3] Rewrite options in `parseObject()`
|
|
66
|
+
- [0.7.4] Bug fix in `parseObject()`
|
|
67
|
+
- [0.8.0] Add `randomRange()`
|
|
68
|
+
- [0.8.0] Add `generateId()`
|
|
69
|
+
|
|
70
|
+
## 2025-12-11
|
|
71
|
+
|
|
72
|
+
- [0.5.0] Add `mergeObjectsByKey(inputs, key)`
|
|
73
|
+
|
|
74
|
+
## 2025-12-10
|
|
75
|
+
|
|
76
|
+
- [0.3.0] Add `filterIndex(inputs, matcher)`
|
|
77
|
+
- [0.4.0] Add `filterDuplicate(inputs, key)`
|
|
78
|
+
- [0.4.0] Add some test with mocha & chai
|
|
79
|
+
|
|
80
|
+
## 2025-12-09
|
|
81
|
+
|
|
82
|
+
- [0.2.3] Bug fix on `getIndex()`
|
|
83
|
+
|
|
84
|
+
## 2025-12-05
|
|
85
|
+
|
|
86
|
+
- [0.2.0] Add `getIndex(inputs, matcher)`
|
|
87
|
+
- [0.2.1] Add above function to `index.js`
|
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2021 Ardhi Lukianto
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021 Ardhi Lukianto
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
# aneka
|
|
2
|
-
|
|
3
|
-
Aneka is a lightweight utility toolkit for everyday JavaScript and Node.js work.
|
|
4
|
-
It provides practical helpers for common tasks like object parsing, deep defaults,
|
|
5
|
-
text formatting, pagination, ID generation, time conversion, and array/object manipulation.
|
|
6
|
-
|
|
7
|
-
Built as an ESM-first package, aneka is designed for projects that prefer
|
|
8
|
-
small, focused utilities over large all-in-one frameworks.
|
|
9
|
-
|
|
10
|
-
## Why aneka?
|
|
11
|
-
|
|
12
|
-
- Daily-use helpers in one package, with consistent function style
|
|
13
|
-
- Safe and practical parsing tools for environment/config values
|
|
14
|
-
- Utilities for strings, arrays, objects, and async timing flows
|
|
15
|
-
- Works well for backend services, scripts, CLIs, and shared utility layers
|
|
16
|
-
|
|
17
|
-
## Install
|
|
18
|
-
|
|
19
|
-
```bash
|
|
20
|
-
npm install aneka
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## Quick start
|
|
24
|
-
|
|
25
|
-
```js
|
|
26
|
-
import { parseObject, defaultsDeep, paginate, titleize } from 'aneka'
|
|
27
|
-
|
|
28
|
-
const cfg = parseObject('{"port":"3000","enabled":"true"}', { parseValue: true })
|
|
29
|
-
// => { port: 3000, enabled: true }
|
|
30
|
-
|
|
31
|
-
const merged = defaultsDeep({ db: { host: 'localhost' } }, { db: { pool: 10 } })
|
|
32
|
-
// => { db: { host: 'localhost', pool: 10 } }
|
|
33
|
-
|
|
34
|
-
const page = paginate([{ id: 1 }, { id: 2 }, { id: 3 }], { page: 1, limit: 2 })
|
|
35
|
-
// => { data: [{ id: 1 }, { id: 2 }], page: 1, limit: 2, count: 3, pages: 2 }
|
|
36
|
-
|
|
37
|
-
titleize('the captain of the sea')
|
|
38
|
-
// => 'The Captain of the Sea'
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
## Hire Me
|
|
42
|
-
|
|
43
|
-
I'm the author of [Bajo Framework](https://bajo.app).
|
|
44
|
-
|
|
45
|
-
If you have a Bajo Framework-based project and need a professional service or assistance, please <a href="https://github.com/ardhi#professional-service">click here</a>. I'd be happy to work on it at a competitive price and with fast turnaround!
|
|
46
|
-
|
|
47
|
-
## Support Me
|
|
48
|
-
|
|
49
|
-
Please support me using the channels below. Your donation will motivate me to work faster and more diligently on future development.
|
|
50
|
-
|
|
51
|
-
<a href="https://github.com/sponsors/ardhi">
|
|
52
|
-
<img src="https://img.shields.io/badge/Github-slategrey?style=flat&logo=github" height="50">
|
|
53
|
-
</a>
|
|
54
|
-
<a href="https://www.paypal.com/ncp/payment/EWLERL7SCUU64">
|
|
55
|
-
<img src="https://img.shields.io/badge/Paypal-blue?style=flat&logo=paypal" height="50">
|
|
56
|
-
</a>
|
|
57
|
-
|
|
58
|
-
<p>
|
|
59
|
-
<div><img alt="bc1qwtv78cwp9ef8hnqaw84fxg5856l0pggqe32g6f" src="static/bitcoin.jpeg" width="150" height="150" /><br>Bitcoin</div>
|
|
60
|
-
</p>
|
|
61
|
-
|
|
62
|
-
## License
|
|
63
|
-
|
|
1
|
+
# aneka
|
|
2
|
+
|
|
3
|
+
Aneka is a lightweight utility toolkit for everyday JavaScript and Node.js work.
|
|
4
|
+
It provides practical helpers for common tasks like object parsing, deep defaults,
|
|
5
|
+
text formatting, pagination, ID generation, time conversion, and array/object manipulation.
|
|
6
|
+
|
|
7
|
+
Built as an ESM-first package, aneka is designed for projects that prefer
|
|
8
|
+
small, focused utilities over large all-in-one frameworks.
|
|
9
|
+
|
|
10
|
+
## Why aneka?
|
|
11
|
+
|
|
12
|
+
- Daily-use helpers in one package, with consistent function style
|
|
13
|
+
- Safe and practical parsing tools for environment/config values
|
|
14
|
+
- Utilities for strings, arrays, objects, and async timing flows
|
|
15
|
+
- Works well for backend services, scripts, CLIs, and shared utility layers
|
|
16
|
+
|
|
17
|
+
## Install
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm install aneka
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Quick start
|
|
24
|
+
|
|
25
|
+
```js
|
|
26
|
+
import { parseObject, defaultsDeep, paginate, titleize } from 'aneka'
|
|
27
|
+
|
|
28
|
+
const cfg = parseObject('{"port":"3000","enabled":"true"}', { parseValue: true })
|
|
29
|
+
// => { port: 3000, enabled: true }
|
|
30
|
+
|
|
31
|
+
const merged = defaultsDeep({ db: { host: 'localhost' } }, { db: { pool: 10 } })
|
|
32
|
+
// => { db: { host: 'localhost', pool: 10 } }
|
|
33
|
+
|
|
34
|
+
const page = paginate([{ id: 1 }, { id: 2 }, { id: 3 }], { page: 1, limit: 2 })
|
|
35
|
+
// => { data: [{ id: 1 }, { id: 2 }], page: 1, limit: 2, count: 3, pages: 2 }
|
|
36
|
+
|
|
37
|
+
titleize('the captain of the sea')
|
|
38
|
+
// => 'The Captain of the Sea'
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Hire Me
|
|
42
|
+
|
|
43
|
+
I'm the author of [Bajo Framework](https://bajo.app).
|
|
44
|
+
|
|
45
|
+
If you have a Bajo Framework-based project and need a professional service or assistance, please <a href="https://github.com/ardhi#professional-service">click here</a>. I'd be happy to work on it at a competitive price and with fast turnaround!
|
|
46
|
+
|
|
47
|
+
## Support Me
|
|
48
|
+
|
|
49
|
+
Please support me using the channels below. Your donation will motivate me to work faster and more diligently on future development.
|
|
50
|
+
|
|
51
|
+
<a href="https://github.com/sponsors/ardhi">
|
|
52
|
+
<img src="https://img.shields.io/badge/Github-slategrey?style=flat&logo=github" height="50">
|
|
53
|
+
</a>
|
|
54
|
+
<a href="https://www.paypal.com/ncp/payment/EWLERL7SCUU64">
|
|
55
|
+
<img src="https://img.shields.io/badge/Paypal-blue?style=flat&logo=paypal" height="50">
|
|
56
|
+
</a>
|
|
57
|
+
|
|
58
|
+
<p>
|
|
59
|
+
<div><img alt="bc1qwtv78cwp9ef8hnqaw84fxg5856l0pggqe32g6f" src="static/bitcoin.jpeg" width="150" height="150" /><br>Bitcoin</div>
|
|
60
|
+
</p>
|
|
61
|
+
|
|
62
|
+
## License
|
|
63
|
+
|
|
64
64
|
This project is licensed under the MIT License. See [LICENSE](LICENSE).
|
|
File without changes
|
|
File without changes
|
package/docs/current-loc.js.html
CHANGED
|
File without changes
|
package/docs/data/search.json
CHANGED
|
File without changes
|
|
File without changes
|
package/docs/delay.js.html
CHANGED
|
File without changes
|
|
File without changes
|
package/docs/fill-object.js.html
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/docs/format-text.js.html
CHANGED
|
File without changes
|
package/docs/generate-id.js.html
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/docs/get-index.js.html
CHANGED
|
File without changes
|
|
File without changes
|
package/docs/global.html
CHANGED
|
File without changes
|
package/docs/includes.js.html
CHANGED
|
File without changes
|
package/docs/index.html
CHANGED
|
File without changes
|
package/docs/is-class.js.html
CHANGED
|
File without changes
|
package/docs/is-set.js.html
CHANGED
|
File without changes
|
|
File without changes
|
package/docs/paginate.js.html
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/docs/parse-env.js.html
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/docs/pascal-case.js.html
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/docs/round.js.html
CHANGED
|
File without changes
|
package/docs/scripts/core.js
CHANGED
|
File without changes
|
package/docs/scripts/core.min.js
CHANGED
|
File without changes
|
package/docs/scripts/resize.js
CHANGED
|
File without changes
|
package/docs/scripts/search.js
CHANGED
|
File without changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const searchId="LiBfqbJVcV",searchHash="#"+searchId,searchContainer=document.querySelector("#PkfLWpAbet"),searchWrapper=document.querySelector("#iCxFxjkHbP"),searchCloseButton=document.querySelector("#VjLlGakifb"),searchInput=document.querySelector("#vpcKVYIppa"),resultBox=document.querySelector("#fWwVHRuDuN");function showResultText(e){resultBox.innerHTML=`<span class="search-result-c-text">${e}</span>`}function hideSearch(){window.location.hash===searchHash&&history.go(-1),window.onhashchange=null,searchContainer&&(searchContainer.style.display="none")}function listenCloseKey(e){"Escape"===e.key&&(hideSearch(),window.removeEventListener("keyup",listenCloseKey))}function showSearch(){try{hideMobileMenu()}catch(e){console.error(e)}window.onhashchange=hideSearch,window.location.hash!==searchHash&&history.pushState(null,null,searchHash),searchContainer&&(searchContainer.style.display="flex",window.addEventListener("keyup",listenCloseKey)),searchInput&&searchInput.focus()}async function fetchAllData(){var{hostname:e,protocol:t,port:n}=location,t=t+"//"+e+(""!==n?":"+n:"")+baseURL,e=new URL("data/search.json",t);const a=await fetch(e);n=(await a.json()).list;return n}function onClickSearchItem(t){const n=t.currentTarget;if(n){const a=n.getAttribute("href")||"";t=a.split("#")[1]||"";let e=document.getElementById(t);e||(t=decodeURI(t),e=document.getElementById(t)),e&&setTimeout(function(){bringElementIntoView(e)},100)}}function buildSearchResult(e){let t="";var n=/(<([^>]+)>)/gi;for(const s of e){const{title:c="",description:i=""}=s.item;var a=s.item.link.replace('<a href="',"").replace(/">.*/,""),o=c.replace(n,""),r=i.replace(n,"");t+=`
|
|
2
|
-
<a onclick="onClickSearchItem(event)" href="${a}" class="search-result-item">
|
|
3
|
-
<div class="search-result-item-title">${o}</div>
|
|
4
|
-
<div class="search-result-item-p">${r||"No description available."}</div>
|
|
5
|
-
</a>
|
|
1
|
+
const searchId="LiBfqbJVcV",searchHash="#"+searchId,searchContainer=document.querySelector("#PkfLWpAbet"),searchWrapper=document.querySelector("#iCxFxjkHbP"),searchCloseButton=document.querySelector("#VjLlGakifb"),searchInput=document.querySelector("#vpcKVYIppa"),resultBox=document.querySelector("#fWwVHRuDuN");function showResultText(e){resultBox.innerHTML=`<span class="search-result-c-text">${e}</span>`}function hideSearch(){window.location.hash===searchHash&&history.go(-1),window.onhashchange=null,searchContainer&&(searchContainer.style.display="none")}function listenCloseKey(e){"Escape"===e.key&&(hideSearch(),window.removeEventListener("keyup",listenCloseKey))}function showSearch(){try{hideMobileMenu()}catch(e){console.error(e)}window.onhashchange=hideSearch,window.location.hash!==searchHash&&history.pushState(null,null,searchHash),searchContainer&&(searchContainer.style.display="flex",window.addEventListener("keyup",listenCloseKey)),searchInput&&searchInput.focus()}async function fetchAllData(){var{hostname:e,protocol:t,port:n}=location,t=t+"//"+e+(""!==n?":"+n:"")+baseURL,e=new URL("data/search.json",t);const a=await fetch(e);n=(await a.json()).list;return n}function onClickSearchItem(t){const n=t.currentTarget;if(n){const a=n.getAttribute("href")||"";t=a.split("#")[1]||"";let e=document.getElementById(t);e||(t=decodeURI(t),e=document.getElementById(t)),e&&setTimeout(function(){bringElementIntoView(e)},100)}}function buildSearchResult(e){let t="";var n=/(<([^>]+)>)/gi;for(const s of e){const{title:c="",description:i=""}=s.item;var a=s.item.link.replace('<a href="',"").replace(/">.*/,""),o=c.replace(n,""),r=i.replace(n,"");t+=`
|
|
2
|
+
<a onclick="onClickSearchItem(event)" href="${a}" class="search-result-item">
|
|
3
|
+
<div class="search-result-item-title">${o}</div>
|
|
4
|
+
<div class="search-result-item-p">${r||"No description available."}</div>
|
|
5
|
+
</a>
|
|
6
6
|
`}return t}function getSearchResult(e,t,n){var t={...{shouldSort:!0,threshold:.4,location:0,distance:100,maxPatternLength:32,minMatchCharLength:1,keys:t}},a=Fuse.createIndex(t.keys,e);const o=new Fuse(e,t,a),r=o.search(n);return 20<r.length?r.slice(0,20):r}function debounce(t,n,a){let o;return function(){const e=arguments;clearTimeout(o),o=setTimeout(()=>{o=null,a||t.apply(this,e)},n),a&&!o&&t.apply(this,e)}}let searchData;async function search(e){e=e.target.value;if(resultBox)if(e){if(!searchData){showResultText("Loading...");try{searchData=await fetchAllData()}catch(e){return console.log(e),void showResultText("Failed to load result.")}}e=getSearchResult(searchData,["title","description"],e);e.length?resultBox.innerHTML=buildSearchResult(e):showResultText("No result found! Try some different combination.")}else showResultText("Type anything to view search result");else console.error("Search result container not found")}function onDomContentLoaded(){const e=document.querySelectorAll(".search-button");var t=debounce(search,300);searchCloseButton&&searchCloseButton.addEventListener("click",hideSearch),e&&e.forEach(function(e){e.addEventListener("click",showSearch)}),searchContainer&&searchContainer.addEventListener("click",hideSearch),searchWrapper&&searchWrapper.addEventListener("click",function(e){e.stopPropagation()}),searchInput&&searchInput.addEventListener("keyup",t),window.location.hash===searchHash&&showSearch()}window.addEventListener("DOMContentLoaded",onDomContentLoaded),window.addEventListener("hashchange",function(){window.location.hash===searchHash&&showSearch()});
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/docs/sec-to-hms.js.html
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/docs/set-timeout.js.html
CHANGED
|
File without changes
|
package/docs/shim.js.html
CHANGED
|
File without changes
|
package/docs/static/bitcoin.jpeg
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/docs/titleize.js.html
CHANGED
|
File without changes
|
package/docs/without.js.html
CHANGED
|
File without changes
|