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.
Files changed (147) hide show
  1. package/.jsdoc.conf.json +0 -0
  2. package/CHANGES.md +87 -83
  3. package/LICENSE +21 -21
  4. package/README.md +63 -63
  5. package/docs/arrange-array.js.html +0 -0
  6. package/docs/create-class.js.html +0 -0
  7. package/docs/current-loc.js.html +0 -0
  8. package/docs/data/search.json +0 -0
  9. package/docs/defaults-deep.js.html +0 -0
  10. package/docs/delay.js.html +0 -0
  11. package/docs/extract-text.js.html +0 -0
  12. package/docs/fill-object.js.html +0 -0
  13. package/docs/filter-duplicate.js.html +0 -0
  14. package/docs/filter-index.js.html +0 -0
  15. package/docs/fonts/Inconsolata-Regular.ttf +0 -0
  16. package/docs/fonts/OpenSans-Regular.ttf +0 -0
  17. package/docs/fonts/WorkSans-Bold.ttf +0 -0
  18. package/docs/format-text.js.html +0 -0
  19. package/docs/generate-id.js.html +0 -0
  20. package/docs/get-caller-filename.js.html +0 -0
  21. package/docs/get-global-module-dir.js.html +0 -0
  22. package/docs/get-index.js.html +0 -0
  23. package/docs/get-key-by-value.js.html +0 -0
  24. package/docs/global.html +0 -0
  25. package/docs/includes.js.html +0 -0
  26. package/docs/index.html +0 -0
  27. package/docs/is-class.js.html +0 -0
  28. package/docs/is-set.js.html +0 -0
  29. package/docs/merge-objects-by-key.js.html +0 -0
  30. package/docs/paginate.js.html +0 -0
  31. package/docs/parse-args-argv.js.html +0 -0
  32. package/docs/parse-duration.js.html +0 -0
  33. package/docs/parse-env.js.html +0 -0
  34. package/docs/parse-kv-string.js.html +0 -0
  35. package/docs/parse-object.js.html +0 -0
  36. package/docs/pascal-case.js.html +0 -0
  37. package/docs/random-range.js.html +0 -0
  38. package/docs/resolve-path.js.html +0 -0
  39. package/docs/round.js.html +0 -0
  40. package/docs/scripts/core.js +0 -0
  41. package/docs/scripts/core.min.js +0 -0
  42. package/docs/scripts/resize.js +0 -0
  43. package/docs/scripts/search.js +0 -0
  44. package/docs/scripts/search.min.js +5 -5
  45. package/docs/scripts/third-party/Apache-License-2.0.txt +0 -0
  46. package/docs/scripts/third-party/fuse.js +0 -0
  47. package/docs/scripts/third-party/hljs-line-num-original.js +0 -0
  48. package/docs/scripts/third-party/hljs-line-num.js +0 -0
  49. package/docs/scripts/third-party/hljs-original.js +0 -0
  50. package/docs/scripts/third-party/hljs.js +0 -0
  51. package/docs/scripts/third-party/popper.js +0 -0
  52. package/docs/scripts/third-party/tippy.js +0 -0
  53. package/docs/scripts/third-party/tocbot.js +0 -0
  54. package/docs/scripts/third-party/tocbot.min.js +0 -0
  55. package/docs/sec-to-hms.js.html +0 -0
  56. package/docs/set-immediate.js.html +0 -0
  57. package/docs/set-interval.js.html +0 -0
  58. package/docs/set-timeout.js.html +0 -0
  59. package/docs/shim.js.html +0 -0
  60. package/docs/static/bitcoin.jpeg +0 -0
  61. package/docs/styles/clean-jsdoc-theme-base.css +0 -0
  62. package/docs/styles/clean-jsdoc-theme-dark.css +0 -0
  63. package/docs/styles/clean-jsdoc-theme-light.css +0 -0
  64. package/docs/styles/clean-jsdoc-theme-scrollbar.css +0 -0
  65. package/docs/styles/clean-jsdoc-theme-without-scrollbar.min.css +0 -0
  66. package/docs/styles/clean-jsdoc-theme.min.css +0 -0
  67. package/docs/text-to-array.js.html +0 -0
  68. package/docs/titleize.js.html +0 -0
  69. package/docs/without.js.html +0 -0
  70. package/index.js +119 -119
  71. package/package.json +48 -48
  72. package/src/arrange-array.js +25 -25
  73. package/src/create-class.js +35 -35
  74. package/src/current-loc.js +0 -0
  75. package/src/defaults-deep.js +20 -20
  76. package/src/delay.js +19 -19
  77. package/src/extract-text.js +23 -23
  78. package/src/fill-object.js +17 -17
  79. package/src/filter-duplicate.js +26 -26
  80. package/src/filter-index.js +17 -17
  81. package/src/format-text.js +88 -88
  82. package/src/generate-id.js +35 -35
  83. package/src/get-caller-filename.js +25 -25
  84. package/src/get-global-module-dir.js +24 -20
  85. package/src/get-index.js +15 -15
  86. package/src/get-key-by-value.js +12 -12
  87. package/src/includes.js +18 -18
  88. package/src/is-class.js +13 -13
  89. package/src/is-set.js +11 -11
  90. package/src/log.js +19 -19
  91. package/src/merge-objects-by-key.js +24 -24
  92. package/src/paginate.js +45 -45
  93. package/src/parse-args-argv.js +0 -0
  94. package/src/parse-duration.js +14 -14
  95. package/src/parse-env.js +0 -0
  96. package/src/parse-kv-string.js +21 -21
  97. package/src/parse-object.js +76 -76
  98. package/src/pascal-case.js +14 -14
  99. package/src/random-range.js +15 -15
  100. package/src/resolve-path.js +0 -0
  101. package/src/round.js +13 -13
  102. package/src/sec-to-hms.js +27 -27
  103. package/src/set-immediate.js +12 -12
  104. package/src/set-interval.js +56 -56
  105. package/src/set-timeout.js +34 -34
  106. package/src/shim.js +28 -28
  107. package/src/text-to-array.js +17 -17
  108. package/src/titleize.js +37 -37
  109. package/src/without.js +18 -18
  110. package/test/arrange-array.js +41 -41
  111. package/test/create-class.js +33 -33
  112. package/test/current-loc.js +24 -24
  113. package/test/defaults-deep.js +19 -19
  114. package/test/delay.js +17 -17
  115. package/test/extract-text.js +17 -17
  116. package/test/fill-object.js +17 -17
  117. package/test/filter-duplicate.js +19 -19
  118. package/test/filter-index.js +17 -17
  119. package/test/format-text.js +26 -26
  120. package/test/generate-id.js +28 -28
  121. package/test/get-caller-filename.js +22 -22
  122. package/test/get-global-module-dir.js +51 -51
  123. package/test/get-index.js +17 -17
  124. package/test/get-key-by-value.js +17 -17
  125. package/test/includes.js +18 -18
  126. package/test/is-class.js +19 -19
  127. package/test/is-set.js +21 -21
  128. package/test/log.js +47 -47
  129. package/test/merge-objects-by-key.js +19 -19
  130. package/test/paginate.js +24 -24
  131. package/test/parse-args-argv.js +63 -63
  132. package/test/parse-duration.js +18 -18
  133. package/test/parse-env.js +35 -35
  134. package/test/parse-kv-string.js +17 -17
  135. package/test/parse-object.js +30 -30
  136. package/test/pascal-case.js +18 -18
  137. package/test/random-range.js +21 -21
  138. package/test/resolve-path.js +22 -22
  139. package/test/round.js +19 -19
  140. package/test/sec-to-hms.js +18 -18
  141. package/test/set-immediate.js +17 -17
  142. package/test/set-interval.js +196 -196
  143. package/test/set-timeout.js +120 -120
  144. package/test/shim.js +34 -34
  145. package/test/text-to-array.js +18 -18
  146. package/test/titleize.js +27 -27
  147. package/test/without.js +17 -17
package/test/shim.js CHANGED
@@ -1,34 +1,34 @@
1
- /* eslint-env mocha */
2
- import { expect } from 'chai'
3
- import fn from '../src/shim.js'
4
-
5
- describe('shim', function () {
6
- it('adds splice polyfill when missing', function () {
7
- const oldSplice = String.prototype.splice
8
- delete String.prototype.splice
9
- try {
10
- fn()
11
- expect('abcd'.splice(1, 2, 'X')).to.equal('aXd')
12
- } finally {
13
- if (oldSplice) String.prototype.splice = oldSplice
14
- else delete String.prototype.splice
15
- }
16
- })
17
-
18
- it('can add replaceAll polyfill when missing', function () {
19
- const oldReplaceAll = String.prototype.replaceAll
20
- delete String.prototype.replaceAll
21
- try {
22
- fn()
23
- expect('abca'.replaceAll('a', 'x')).to.equal('xbcx')
24
- } finally {
25
- if (oldReplaceAll) String.prototype.replaceAll = oldReplaceAll
26
- else delete String.prototype.replaceAll
27
- }
28
- })
29
-
30
- it('can be called repeatedly without throwing', function () {
31
- expect(() => fn()).to.not.throw()
32
- expect(() => fn()).to.not.throw()
33
- })
34
- })
1
+ /* eslint-env mocha */
2
+ import { expect } from 'chai'
3
+ import fn from '../src/shim.js'
4
+
5
+ describe('shim', function () {
6
+ it('adds splice polyfill when missing', function () {
7
+ const oldSplice = String.prototype.splice
8
+ delete String.prototype.splice
9
+ try {
10
+ fn()
11
+ expect('abcd'.splice(1, 2, 'X')).to.equal('aXd')
12
+ } finally {
13
+ if (oldSplice) String.prototype.splice = oldSplice
14
+ else delete String.prototype.splice
15
+ }
16
+ })
17
+
18
+ it('can add replaceAll polyfill when missing', function () {
19
+ const oldReplaceAll = String.prototype.replaceAll
20
+ delete String.prototype.replaceAll
21
+ try {
22
+ fn()
23
+ expect('abca'.replaceAll('a', 'x')).to.equal('xbcx')
24
+ } finally {
25
+ if (oldReplaceAll) String.prototype.replaceAll = oldReplaceAll
26
+ else delete String.prototype.replaceAll
27
+ }
28
+ })
29
+
30
+ it('can be called repeatedly without throwing', function () {
31
+ expect(() => fn()).to.not.throw()
32
+ expect(() => fn()).to.not.throw()
33
+ })
34
+ })
@@ -1,18 +1,18 @@
1
- /* eslint-env mocha */
2
- import { expect } from 'chai'
3
- import fn from '../src/text-to-array.js'
4
-
5
- describe('textToArray', function () {
6
- it('removes blank lines and comment-only lines', function () {
7
- const out = fn('a\n# only comment\n b # keep\n\n c')
8
- expect(out).to.deep.equal(['a', 'b # keep', 'c'])
9
- })
10
-
11
- it('trims surrounding spaces from each line', function () {
12
- expect(fn(' a \n b ')).to.deep.equal(['a', 'b'])
13
- })
14
-
15
- it('returns empty array when input has only comments and blanks', function () {
16
- expect(fn('\n# c\n # d\n')).to.deep.equal([])
17
- })
18
- })
1
+ /* eslint-env mocha */
2
+ import { expect } from 'chai'
3
+ import fn from '../src/text-to-array.js'
4
+
5
+ describe('textToArray', function () {
6
+ it('removes blank lines and comment-only lines', function () {
7
+ const out = fn('a\n# only comment\n b # keep\n\n c')
8
+ expect(out).to.deep.equal(['a', 'b # keep', 'c'])
9
+ })
10
+
11
+ it('trims surrounding spaces from each line', function () {
12
+ expect(fn(' a \n b ')).to.deep.equal(['a', 'b'])
13
+ })
14
+
15
+ it('returns empty array when input has only comments and blanks', function () {
16
+ expect(fn('\n# c\n # d\n')).to.deep.equal([])
17
+ })
18
+ })
package/test/titleize.js CHANGED
@@ -1,27 +1,27 @@
1
- /* eslint-env mocha */
2
- import { expect } from 'chai'
3
- import fn from '../src/titleize.js'
4
-
5
- describe('titleize', function () {
6
- it('converts text to title-case output', function () {
7
- expect(fn('the captain of the sea')).to.equal('The Captain of The Sea')
8
- })
9
-
10
- it('keeps ignored words unchanged when configured', function () {
11
- expect(fn('go to mars', { ignores: ['to'] })).to.equal('Go to Mars')
12
- })
13
-
14
- it('supports replacement map before title conversion', function () {
15
- const out = fn('hello usa', { replacement: { usa: 'USA' } })
16
- expect(out).to.be.a('string')
17
- expect(out.startsWith('Hello')).to.equal(true)
18
- })
19
-
20
- it('returns empty string for empty input', function () {
21
- expect(fn('')).to.equal('')
22
- })
23
-
24
- it('keeps default ignored words (and/of/or/with) in lowercase', function () {
25
- expect(fn('king of sea and sky')).to.equal('King of Sea and Sky')
26
- })
27
- })
1
+ /* eslint-env mocha */
2
+ import { expect } from 'chai'
3
+ import fn from '../src/titleize.js'
4
+
5
+ describe('titleize', function () {
6
+ it('converts text to title-case output', function () {
7
+ expect(fn('the captain of the sea')).to.equal('The Captain of The Sea')
8
+ })
9
+
10
+ it('keeps ignored words unchanged when configured', function () {
11
+ expect(fn('go to mars', { ignores: ['to'] })).to.equal('Go to Mars')
12
+ })
13
+
14
+ it('supports replacement map before title conversion', function () {
15
+ const out = fn('hello usa', { replacement: { usa: 'USA' } })
16
+ expect(out).to.be.a('string')
17
+ expect(out.startsWith('Hello')).to.equal(true)
18
+ })
19
+
20
+ it('returns empty string for empty input', function () {
21
+ expect(fn('')).to.equal('')
22
+ })
23
+
24
+ it('keeps default ignored words (and/of/or/with) in lowercase', function () {
25
+ expect(fn('king of sea and sky')).to.equal('King of Sea and Sky')
26
+ })
27
+ })
package/test/without.js CHANGED
@@ -1,17 +1,17 @@
1
- /* eslint-env mocha */
2
- import { expect } from 'chai'
3
- import fn from '../src/without.js'
4
-
5
- describe('without', function () {
6
- it('removes provided and empty-like values', function () {
7
- expect(fn([1, 2, null, '', 3, undefined], 2)).to.deep.equal([1, 3])
8
- })
9
-
10
- it('removes null, undefined and empty string by default', function () {
11
- expect(fn([null, undefined, '', 'x'])).to.deep.equal(['x'])
12
- })
13
-
14
- it('returns empty array for empty input', function () {
15
- expect(fn([])).to.deep.equal([])
16
- })
17
- })
1
+ /* eslint-env mocha */
2
+ import { expect } from 'chai'
3
+ import fn from '../src/without.js'
4
+
5
+ describe('without', function () {
6
+ it('removes provided and empty-like values', function () {
7
+ expect(fn([1, 2, null, '', 3, undefined], 2)).to.deep.equal([1, 3])
8
+ })
9
+
10
+ it('removes null, undefined and empty string by default', function () {
11
+ expect(fn([null, undefined, '', 'x'])).to.deep.equal(['x'])
12
+ })
13
+
14
+ it('returns empty array for empty input', function () {
15
+ expect(fn([])).to.deep.equal([])
16
+ })
17
+ })