atomic-fns 0.2.0 → 0.2.3

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 (64) hide show
  1. package/.esdoc.json +19 -1
  2. package/.eslintrc.json +1 -0
  3. package/README.md +8 -9
  4. package/package.json +9 -9
  5. package/src/collections/index.d.ts +658 -0
  6. package/src/collections/index.js +1068 -0
  7. package/src/collections/index.ts +1162 -0
  8. package/src/datetime/index.d.ts +6 -0
  9. package/src/datetime/index.js +6 -0
  10. package/src/datetime/index.ts +7 -0
  11. package/src/{functools.d.ts → functools/index.d.ts} +10 -5
  12. package/src/{functools.js → functools/index.js} +9 -4
  13. package/src/{functools.ts → functools/index.ts} +11 -5
  14. package/src/globals/index.d.ts +291 -0
  15. package/src/globals/index.js +391 -0
  16. package/src/globals/index.ts +456 -0
  17. package/src/index.d.ts +8 -7
  18. package/src/index.js +8 -7
  19. package/src/index.ts +8 -7
  20. package/src/itertools/index.d.ts +254 -0
  21. package/src/itertools/index.js +485 -0
  22. package/src/itertools/index.ts +511 -0
  23. package/src/math/index.d.ts +21 -0
  24. package/src/math/index.js +39 -0
  25. package/src/math/index.ts +44 -0
  26. package/src/{operators.d.ts → operators/index.d.ts} +8 -6
  27. package/src/{operators.js → operators/index.js} +69 -26
  28. package/src/{operators.ts → operators/index.ts} +77 -28
  29. package/src/random/index.d.ts +42 -0
  30. package/src/random/index.js +65 -0
  31. package/src/random/index.ts +66 -0
  32. package/tests/collections.spec.ts +119 -30
  33. package/tests/globals.spec.ts +91 -49
  34. package/tests/itertools.spec.ts +207 -14
  35. package/tests/operators.spec.ts +7 -29
  36. package/tests/random.spec.ts +46 -0
  37. package/tsconfig.json +19 -3
  38. package/src/collections.d.ts +0 -224
  39. package/src/collections.js +0 -570
  40. package/src/collections.ts +0 -637
  41. package/src/datetime.d.ts +0 -1
  42. package/src/datetime.js +0 -1
  43. package/src/datetime.ts +0 -1
  44. package/src/globals.d.ts +0 -175
  45. package/src/globals.js +0 -329
  46. package/src/globals.ts +0 -373
  47. package/src/itertools.d.ts +0 -16
  48. package/src/itertools.js +0 -101
  49. package/src/itertools.ts +0 -112
  50. package/src/math.d.ts +0 -16
  51. package/src/math.js +0 -67
  52. package/src/math.ts +0 -73
  53. package/src/objects.d.ts +0 -0
  54. package/src/objects.js +0 -1
  55. package/src/objects.ts +0 -0
  56. package/src/random.d.ts +0 -22
  57. package/src/random.js +0 -48
  58. package/src/random.ts +0 -49
  59. package/src/strings.d.ts +0 -0
  60. package/src/strings.js +0 -1
  61. package/src/strings.ts +0 -0
  62. package/src/util.d.ts +0 -0
  63. package/src/util.js +0 -1
  64. package/src/util.ts +0 -0
@@ -1,43 +1,42 @@
1
1
  import assert from 'assert'
2
2
  import {
3
- True,
4
- False,
3
+ bin,
4
+ call,
5
+ chr,
5
6
  CustomError,
6
- type,
7
- str,
8
- isBool,
9
- isObject,
10
- isString,
7
+ False,
8
+ get,
9
+ hash,
10
+ hashCode,
11
+ HASH_KEY,
12
+ hex,
11
13
  isArray,
12
14
  isArrayLike,
13
- isNumber,
14
- isNaN,
15
- isNull,
15
+ isAsync,
16
16
  isBigint,
17
+ isBool,
18
+ isEmpty,
17
19
  isFunc,
20
+ isNaN,
21
+ isNull,
22
+ isNumber,
23
+ isObject,
18
24
  isPromise,
25
+ isString,
19
26
  isSymbol,
20
- isAsync,
21
- uniqueId,
22
- call,
23
- chr,
24
- ord,
25
27
  keys,
26
- values,
27
- round,
28
- enumerate,
29
- isEmpty,
30
- isGenerator,
31
- hash,
32
- hashCode,
33
- HASH_KEY,
34
- bin,
35
- hex,
36
- oct,
37
28
  list,
38
29
  next,
39
- get
40
- } from '../src/globals.js'
30
+ oct,
31
+ ord,
32
+ round,
33
+ str,
34
+ True,
35
+ type,
36
+ uniqueId,
37
+ values
38
+ } from '../src/globals/index.js'
39
+ import { enumerate } from '../src/itertools/index.js'
41
40
 
42
41
  function cb() {}
43
42
 
@@ -47,9 +46,11 @@ describe('globals', () => {
47
46
  assert.equal(err.message, 'custom')
48
47
  })
49
48
 
49
+ it('True', () => assert(True() === true))
50
+
51
+ it('False', () => assert(False() === false))
52
+
50
53
  it('type', () => {
51
- assert(True())
52
- assert(!False())
53
54
  assert(type(null) === 'null')
54
55
  assert(type(undefined) === 'undefined')
55
56
  assert(type(true) === 'boolean')
@@ -69,36 +70,87 @@ describe('globals', () => {
69
70
  assert(type({}) === 'object')
70
71
  assert(type(type) === 'function')
71
72
  assert(type(Symbol()) === 'symbol')
72
- assert(type(new Promise(cb)) === 'promise')
73
+ assert(type(new Map()) === 'Map')
74
+ assert(type(new WeakMap()) === 'WeakMap')
75
+ assert(type(new Set()) === 'Set')
76
+ assert(type(new WeakSet()) === 'WeakSet')
77
+ assert(type(new Promise(cb)) === 'Promise')
78
+ assert(type(new Int8Array()) === 'Int8Array')
79
+ assert(type(new Uint8Array()) === 'Uint8Array')
80
+ assert(type(new Uint8ClampedArray()) === 'Uint8ClampedArray')
81
+ assert(type(new Int16Array()) === 'Int16Array')
82
+ assert(type(new Uint16Array()) === 'Uint16Array')
83
+ assert(type(new Int32Array()) === 'Int32Array')
84
+ assert(type(new Uint32Array()) === 'Uint32Array')
85
+ assert(type(new Float32Array()) === 'Float32Array')
86
+ assert(type(new Float64Array()) === 'Float64Array')
87
+ assert(type(new ArrayBuffer(8)) === 'ArrayBuffer')
88
+ assert(type(new DataView(new ArrayBuffer(8))) === 'DataView')
89
+ })
90
+
91
+ it('isBool', () => {
73
92
  assert(isBool(true))
74
93
  assert(isBool(Boolean()))
75
94
  assert(!isBool(''))
76
95
  assert(!isBool({}))
77
96
  assert(!isBool(undefined))
97
+ })
98
+
99
+ it('isObject', () => {
78
100
  assert(isObject({}))
79
101
  assert(!isObject(''))
80
102
  assert(!isObject([]))
103
+ })
104
+
105
+ it('isString', () => {
81
106
  assert(isString(''))
82
107
  assert(!isString([]))
108
+ })
109
+
110
+ it('isArray', () => {
83
111
  assert(isArray([]))
84
112
  assert(isArrayLike([]))
85
113
  assert(!isArray(''))
86
114
  assert(!isArrayLike(''))
115
+ })
116
+
117
+ it('isFunc', () => {
87
118
  assert(isFunc(cb))
88
119
  assert(!isFunc([]))
120
+ })
121
+
122
+ it('isAsync', () => {
89
123
  assert(isAsync(async function () {}))
90
124
  assert(isAsync(async () => {}))
91
125
  assert(!isAsync(cb))
126
+ })
127
+
128
+ it('isNaN', () => {
92
129
  assert(isNaN(NaN))
130
+ })
131
+
132
+ it('isNumber', () => {
93
133
  assert(!isNumber(NaN))
94
134
  assert(isNumber(42))
95
135
  assert(isNumber(Number(42)))
96
136
  assert(isNumber(Number('42')))
97
137
  assert(isNumber(parseFloat('42.0')))
138
+ })
139
+
140
+ it('isBigInt', () => {
98
141
  assert(isBigint(42n))
99
142
  assert(isBigint(BigInt('42')))
143
+ })
144
+
145
+ it('isPromise', () => {
100
146
  assert(isPromise(new Promise(cb)))
147
+ })
148
+
149
+ it('isSymbol', () => {
101
150
  assert(isSymbol(Symbol()))
151
+ })
152
+
153
+ it('isNull', () => {
102
154
  assert(isNull(null))
103
155
  assert(isNull(undefined))
104
156
  assert(!isNull(''))
@@ -163,17 +215,6 @@ describe('globals', () => {
163
215
  assert(round(1.545, 3) === 1.545)
164
216
  })
165
217
 
166
- it('enumerate', () => {
167
- let iter = enumerate(['foo', 'bar', 'baz'])
168
- assert(isGenerator(iter))
169
- let values = [...iter]
170
- assert.deepEqual(values, [
171
- [0, 'foo'],
172
- [1, 'bar'],
173
- [2, 'baz']
174
- ])
175
- })
176
-
177
218
  it('next', () => {
178
219
  const iter = enumerate([1, 2, 3])
179
220
  assert.deepEqual(next(iter), [0, 1])
@@ -213,15 +254,15 @@ describe('globals', () => {
213
254
 
214
255
  it('get', () => {
215
256
  const arr = [1, 2, 3]
216
- assert(get(arr, '2') === 3)
217
- assert(get(arr, '3', false) === false)
218
- assert(get(arr, '3', false) === false)
257
+ assert(get('2', arr) === 3)
258
+ assert(get('3', arr, false) === false)
259
+ assert(get('3', arr, false) === false)
219
260
  let obj = { foo: { bar: true } }
220
261
  let h = hash(obj)
221
- assert(get(obj, 'foo.bar'))
222
- assert(get(obj, ['foo', 'bar']))
223
- assert(get(obj, HASH_KEY) === h)
224
- assert(get(obj, [HASH_KEY]) === h)
262
+ assert(get('foo.bar', obj))
263
+ assert(get(['foo', 'bar'], obj))
264
+ assert(get(HASH_KEY, obj) === h)
265
+ assert(get([HASH_KEY], obj) === h)
225
266
  })
226
267
 
227
268
  it('isEmpty', () => {
@@ -231,6 +272,7 @@ describe('globals', () => {
231
272
  assert(isEmpty(''))
232
273
  assert(isEmpty({}))
233
274
  assert(isEmpty(0))
275
+ assert(isEmpty(false))
234
276
  assert(!isEmpty(1))
235
277
  })
236
278
  })
@@ -1,10 +1,183 @@
1
1
  import assert from 'assert'
2
- import { list } from '../src/globals.js'
3
- import { reversed, sort, sorted, times, zip } from '../src/itertools.js'
2
+ import {
3
+ accumulate,
4
+ all,
5
+ any,
6
+ chain,
7
+ contains,
8
+ dropWhile,
9
+ enumerate,
10
+ first,
11
+ flatMap,
12
+ icompact,
13
+ ifilter,
14
+ iflatten,
15
+ imap,
16
+ islice,
17
+ itake,
18
+ max,
19
+ min,
20
+ partition,
21
+ range,
22
+ reduce,
23
+ reversed,
24
+ sort,
25
+ sorted,
26
+ sum,
27
+ take,
28
+ takeWhile,
29
+ times,
30
+ zip
31
+ } from '../src/itertools/index.js'
4
32
 
5
- function cb() {}
33
+ const Falsy = (x) => !x
6
34
 
7
35
  describe('operators', () => {
36
+ it('accumulate', () => {
37
+ assert.deepEqual([...accumulate([1, 2, 3, 4])], [1, 3, 6, 10])
38
+ assert.deepEqual(
39
+ [...accumulate([3, 4, 6, 2, 1, 9, 0, 7, 5, 8], (x, y) => max([x, y]))],
40
+ [3, 4, 6, 6, 6, 9, 9, 9, 9, 9]
41
+ )
42
+ })
43
+
44
+ it('all', () => {
45
+ assert(all([1, true, [], 'test', {}]))
46
+ assert(!all([[], {}, '']))
47
+ assert(all<any>([false, 0, '', null, undefined, NaN], Falsy))
48
+ })
49
+
50
+ it('any', () => {
51
+ assert(any([1, true, [], 'test', {}]))
52
+ assert(!any([0, false, '']))
53
+ assert(any([0, false, ''], Falsy))
54
+ })
55
+
56
+ it('chain', () => {
57
+ let it = chain([1, 3, 5], [2, 4, 6])
58
+ assert.deepEqual([...it], [1, 3, 5, 2, 4, 6])
59
+ })
60
+
61
+ it('contains', () => {
62
+ assert(contains([4, 7, 1, 9], 1))
63
+ assert(!contains([4, 7, 1, 9], NaN))
64
+ })
65
+
66
+ it('dropWhile', () => {
67
+ let it = dropWhile([false, 0, '', true, '', []], Falsy)
68
+ assert.deepEqual([...it], [true, '', []])
69
+ })
70
+
71
+ it('enumerate', () => {
72
+ let iter = enumerate(['foo', 'bar', 'baz'])
73
+ let values = [...iter]
74
+ assert.deepEqual(values, [
75
+ [0, 'foo'],
76
+ [1, 'bar'],
77
+ [2, 'baz']
78
+ ])
79
+ })
80
+
81
+ it('first', () => {
82
+ assert(first(['foo', 'bar']) === 'foo')
83
+ assert(first([0, 1]) === 0)
84
+ assert(first([1, 1]) === 1)
85
+ })
86
+
87
+ it('flatMap', () => {
88
+ assert.deepEqual(
89
+ [
90
+ ...flatMap([
91
+ [1, 2],
92
+ [3, 4]
93
+ ])
94
+ ],
95
+ [1, 2, 3, 4]
96
+ )
97
+ assert.deepEqual(
98
+ [
99
+ ...flatMap(
100
+ [
101
+ [1, 2],
102
+ [3, 4]
103
+ ],
104
+ ([x, y]) => [x * 2, y * 2]
105
+ )
106
+ ],
107
+ [2, 4, 6, 8]
108
+ )
109
+ })
110
+
111
+ it('icompact', () => {
112
+ let it = icompact([false, 0, '', true, '', []])
113
+ assert.deepEqual([...it], [true])
114
+ })
115
+
116
+ it('ifilter', () => {
117
+ let users = [
118
+ { user: 'barney', age: 36, active: true },
119
+ { user: 'fred', age: 40, active: false }
120
+ ]
121
+ let it = ifilter(users, (x) => !x.active)
122
+ assert.deepEqual([...it], [users[1]])
123
+ })
124
+
125
+ it('iflatten', () => {
126
+ let it = iflatten([
127
+ [0, 1],
128
+ [2, 3]
129
+ ])
130
+ assert.deepEqual([...it], [0, 1, 2, 3])
131
+ })
132
+
133
+ it('imap', () => {
134
+ let it = imap([0, 1, 2, 3], (x) => 2 ** x)
135
+ assert.deepEqual([...it], [1, 2, 4, 8])
136
+ })
137
+
138
+ it('islice', () => {
139
+ assert.deepEqual([...islice([1, 2, 3], 1)], [2, 3])
140
+ assert.deepEqual([...islice([1, 2, 3, 4], 2)], [3, 4])
141
+ assert.deepEqual([...islice([1, 2, 3, 4], 1, 3)], [2, 3])
142
+ assert.deepEqual([...islice([1, 2, 3, 4, 5], 0, 4)], [1, 2, 3, 4])
143
+ assert.deepEqual([...islice([1, 2, 3, 4, 5], 0, 4, 2)], [1, 3])
144
+ })
145
+
146
+ it('itake', () => {
147
+ let it = itake(3, [false, 0, '', true, '', []])
148
+ assert.deepEqual([...it], [false, 0, ''])
149
+ })
150
+
151
+ it('take', () => {
152
+ let it = take(3, [false, 0, '', true, '', []])
153
+ assert.deepEqual(it, [false, 0, ''])
154
+ })
155
+
156
+ it('min', () => {
157
+ assert(min([5, 4, 3, 1, 2]) === 1)
158
+ })
159
+
160
+ it('max', () => {
161
+ assert(max([7, 9, 3, 11]) === 11)
162
+ })
163
+
164
+ it('partition', () => {
165
+ let [A, B] = partition([false, 0, '', true, '', []], Falsy)
166
+ assert.deepEqual(A, [false, 0, '', ''])
167
+ assert.deepEqual(B, [true, []])
168
+ })
169
+
170
+ it('range', () => {
171
+ assert.deepEqual([...range(4)], [0, 1, 2, 3])
172
+ assert.deepEqual([...range(5, 9)], [5, 6, 7, 8])
173
+ assert.deepEqual([...range(5, 0, -2)], [5, 3, 1])
174
+ assert.deepEqual([...range(-3)], [])
175
+ })
176
+
177
+ it('reduce', () => {
178
+ assert(reduce([1, 2, 3, 4, 5], (x, y) => x + y, 0) === 15)
179
+ })
180
+
8
181
  it('reversed', () => {
9
182
  let arr = [3, 2, 1]
10
183
  let reverse = reversed(arr)
@@ -15,17 +188,21 @@ describe('operators', () => {
15
188
  it('sort', () => {
16
189
  let arr = [3, 2, 1]
17
190
  assert.deepEqual(sort(arr), [1, 2, 3])
18
- arr = [3, 1, 2]
191
+ })
192
+
193
+ it('sort reversed', () => {
194
+ let arr = [3, 1, 2]
19
195
  assert.deepEqual(sort(arr, true), [3, 2, 1])
20
196
  })
21
197
 
22
198
  it('sorted', () => {
23
199
  let arr = [3, 2, 1]
24
- let sort = sorted(arr)
25
- arr.sort()
26
- assert.deepEqual(sort, arr)
27
- // reversed order
200
+ assert.deepEqual(sorted(arr), arr.sort())
201
+ // sorted in reverse
28
202
  assert.deepEqual(sorted([3, 1, 2], true), [3, 2, 1])
203
+ })
204
+
205
+ it('sorted by key', () => {
29
206
  let users = [
30
207
  { user: 'fred', age: 40 },
31
208
  { user: 'barney', age: 36 }
@@ -46,7 +223,13 @@ describe('operators', () => {
46
223
  { user: 'barney', age: 36 }
47
224
  ]
48
225
  )
49
- // using custom compare
226
+ })
227
+
228
+ it('sorted with custom compare', () => {
229
+ let users = [
230
+ { user: 'fred', age: 40 },
231
+ { user: 'barney', age: 36 }
232
+ ]
50
233
  assert.deepEqual(
51
234
  sorted(users, false, (x, y) => (x.user <= y.user ? -1 : 1)),
52
235
  [
@@ -56,11 +239,24 @@ describe('operators', () => {
56
239
  )
57
240
  })
58
241
 
242
+ it('sum', () => {
243
+ assert(sum([]) === 0)
244
+ assert(sum([1, 2, 3, 4]) === 10)
245
+ assert(sum([1, 2, 3, 4], 5) === 15)
246
+ })
247
+
59
248
  it('times', () => {
60
- let arr = list(times(5, (x) => x))
249
+ let arr = [...times(5, (x) => x)]
61
250
  assert.deepEqual(arr, [0, 1, 2, 3, 4])
62
251
  })
63
252
 
253
+ it('takeWhile', () => {
254
+ let arr = [...takeWhile([1, 2, 3, 4], (x) => x < 4)]
255
+ assert.deepEqual(arr, [1, 2, 3])
256
+ arr = [...takeWhile([1, 2, 3, 4, 5], (x) => x)]
257
+ assert.deepEqual(arr, [1, 2, 3, 4, 5])
258
+ })
259
+
64
260
  it('zip', () => {
65
261
  let users1 = [
66
262
  { user: 'barney', age: 36 },
@@ -71,10 +267,7 @@ describe('operators', () => {
71
267
  { user: 'barney', age: 36 }
72
268
  ]
73
269
 
74
- let results = [] as any
75
- for (const t of zip(users1, users2)) {
76
- results.push(t)
77
- }
270
+ let results = [...zip(users1, users2)]
78
271
 
79
272
  let [first1, first2] = results[0]
80
273
  assert(first1 === users1[0])
@@ -1,18 +1,13 @@
1
1
  import assert from 'assert'
2
- import { isEmpty } from '../src/globals.js'
3
- import { bool, id, isinstance, not, all, any, comp, shallowEqual } from '../src/operators.js'
2
+ import { bool, id, isinstance, not, comp, shallowEqual } from '../src/operators/index.js'
4
3
 
5
4
  describe('operators', () => {
6
- it('all', () => {
7
- assert(all([1, true, [], 'test', {}]))
8
- assert(!all([[], {}, '']))
9
- assert(all([[], {}, ''], isEmpty))
10
- })
11
-
12
- it('any', () => {
13
- assert(any([1, true, [], 'test', {}]))
14
- assert(!any([0, false, '']))
15
- assert(any([0, false, ''], (x) => !x))
5
+ it('id', () => {
6
+ assert(id(true) === true)
7
+ assert(id(false) === false)
8
+ assert(id(3.0) === 3.0)
9
+ assert(id('') === '')
10
+ assert(id(Object) === Object)
16
11
  })
17
12
 
18
13
  it('bool', () => {
@@ -29,11 +24,6 @@ describe('operators', () => {
29
24
  assert(comp(4, 3) === 1)
30
25
  })
31
26
 
32
- it('id', () => {
33
- let x = Math.random()
34
- assert(id(x) === x)
35
- })
36
-
37
27
  it('isinstance', () => {
38
28
  assert(isinstance([], Array))
39
29
  assert(isinstance(Array(), Array))
@@ -46,17 +36,5 @@ describe('operators', () => {
46
36
  assert(shallowEqual({}, {}))
47
37
  assert(shallowEqual([], []))
48
38
  assert(shallowEqual({ test: true }, { test: true }))
49
- assert(
50
- shallowEqual(
51
- {
52
- value: 42,
53
- // custom equals implementation will be used
54
- eq(other) {
55
- return this.value === other.value
56
- }
57
- },
58
- { value: 42 }
59
- )
60
- )
61
39
  })
62
40
  })
@@ -0,0 +1,46 @@
1
+ import assert from 'assert'
2
+ import { any, times } from '../src/itertools/index.js'
3
+ import { choice, random, randomInt, sample, shuffle } from '../src/random/index.js'
4
+
5
+ const randomArr = () => [...times(10, (i) => randomInt(i, 71))]
6
+
7
+ describe('random', () => {
8
+ it('choice', () => {
9
+ let arr = randomArr()
10
+ for (let i = 0; i < 10; i++) {
11
+ assert(arr.includes(choice(arr)))
12
+ }
13
+ })
14
+
15
+ it('random', () => {
16
+ for (let i = 1; i <= 10; i++) {
17
+ let r = random(0, i)
18
+ assert(0 <= r && r < i)
19
+ }
20
+ })
21
+
22
+ it('randomInt', () => {
23
+ for (let i = 1; i <= 10; i++) {
24
+ let r = randomInt(0, i)
25
+ assert(0 <= r && r <= i)
26
+ }
27
+ })
28
+
29
+ it('shuffle', () => {
30
+ let arr = randomArr()
31
+ let copy = arr.slice()
32
+ for (let i = 0; i < 10; i++) {
33
+ assert(shuffle(copy) === copy)
34
+ assert(copy.some((x, i) => x !== arr[i]))
35
+ }
36
+ })
37
+
38
+ it('sample', () => {
39
+ let arr = randomArr()
40
+ for (let i = 0; i < 10; i++) {
41
+ let s = sample(arr, 3)
42
+ assert(s.length === 3)
43
+ assert(s.some((x, i) => x !== arr[i]))
44
+ }
45
+ })
46
+ })
package/tsconfig.json CHANGED
@@ -9,9 +9,10 @@
9
9
  // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
10
10
  // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
11
11
  /* Language and Environment */
12
- "target": "ESNext", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
12
+ "target": "ES2022", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
13
13
  "lib": [
14
14
  "ESNext",
15
+ "ES2022",
15
16
  "DOM"
16
17
  ], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
17
18
  // "jsx": "preserve", /* Specify what JSX code is generated. */
@@ -95,6 +96,9 @@
95
96
  // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
96
97
  "skipLibCheck": true /* Skip type checking all .d.ts files. */
97
98
  },
99
+ "exclude": [
100
+ "**/*.spec.ts"
101
+ ],
98
102
  "references": [
99
103
  {
100
104
  "path": "./tsconfig.node.json"
@@ -102,8 +106,20 @@
102
106
  ],
103
107
  "typedocOptions": {
104
108
  "entryPoints": [
105
- "src/index.ts"
109
+ "./src/globals/index.ts",
110
+ "./src/collections/index.ts",
111
+ "./src/datetime/index.ts",
112
+ "./src/functools/index.ts",
113
+ "./src/itertools/index.ts",
114
+ "./src/math/index.ts",
115
+ "./src/operators/index.ts",
116
+ "./src/random/index.ts",
117
+ ],
118
+ "out": "docs",
119
+ "exclude": [
120
+ "node_modules"
106
121
  ],
107
- "out": "docs"
122
+ "excludeExternals": true,
123
+ "excludePrivate": true,
108
124
  }
109
125
  }