@tsdotnet/array-utility 1.0.29 → 1.0.31
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/dist/cjs/arrayUtility.js +21 -122
- package/dist/cjs/arrayUtility.js.map +1 -1
- package/dist/esm/arrayUtility.js +47 -145
- package/dist/esm/arrayUtility.js.map +1 -1
- package/dist/types/arrayUtility.d.ts +30 -0
- package/package.json +28 -38
- package/rollup.config.js +36 -0
- package/dist/arrayUtility.d.ts +0 -138
- package/dist/umd/arrayUtility.js +0 -340
- package/dist/umd/arrayUtility.js.map +0 -1
package/dist/umd/arrayUtility.js
DELETED
|
@@ -1,340 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* @author electricessence / https://github.com/electricessence/
|
|
3
|
-
* @license MIT
|
|
4
|
-
*/
|
|
5
|
-
(function (factory) {
|
|
6
|
-
if (typeof module === "object" && typeof module.exports === "object") {
|
|
7
|
-
var v = factory(require, exports);
|
|
8
|
-
if (v !== undefined) module.exports = v;
|
|
9
|
-
}
|
|
10
|
-
else if (typeof define === "function" && define.amd) {
|
|
11
|
-
define(["require", "exports", "tslib", "@tsdotnet/exceptions", "@tsdotnet/array-init", "@tsdotnet/type", "@tsdotnet/array-copy", "@tsdotnet/integer", "@tsdotnet/compare"], factory);
|
|
12
|
-
}
|
|
13
|
-
})(function (require, exports) {
|
|
14
|
-
"use strict";
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.copyTo = exports.copy = exports.init = void 0;
|
|
17
|
-
exports.indexOf = indexOf;
|
|
18
|
-
exports.contains = contains;
|
|
19
|
-
exports.replace = replace;
|
|
20
|
-
exports.updateRange = updateRange;
|
|
21
|
-
exports.clearEach = clearEach;
|
|
22
|
-
exports.register = register;
|
|
23
|
-
exports.findIndex = findIndex;
|
|
24
|
-
exports.forEach = forEach;
|
|
25
|
-
exports.applyTo = applyTo;
|
|
26
|
-
exports.removeIndex = removeIndex;
|
|
27
|
-
exports.remove = remove;
|
|
28
|
-
exports.repeat = repeat;
|
|
29
|
-
exports.range = range;
|
|
30
|
-
exports.rangeUntil = rangeUntil;
|
|
31
|
-
exports.distinct = distinct;
|
|
32
|
-
exports.flatten = flatten;
|
|
33
|
-
const tslib_1 = require("tslib");
|
|
34
|
-
const exceptions_1 = require("@tsdotnet/exceptions");
|
|
35
|
-
const array_init_1 = tslib_1.__importDefault(require("@tsdotnet/array-init"));
|
|
36
|
-
exports.init = array_init_1.default;
|
|
37
|
-
const type_1 = tslib_1.__importDefault(require("@tsdotnet/type"));
|
|
38
|
-
const array_copy_1 = tslib_1.__importStar(require("@tsdotnet/array-copy"));
|
|
39
|
-
exports.copy = array_copy_1.default;
|
|
40
|
-
Object.defineProperty(exports, "copyTo", { enumerable: true, get: function () { return array_copy_1.arrayCopyTo; } });
|
|
41
|
-
const integer_1 = tslib_1.__importDefault(require("@tsdotnet/integer"));
|
|
42
|
-
const compare_1 = require("@tsdotnet/compare");
|
|
43
|
-
const CBN = 'Cannot be null.', CB0 = 'Cannot be zero.', CBL0 = 'Cannot be less than zero.', VFN = 'Must be a valid finite number';
|
|
44
|
-
/**
|
|
45
|
-
* Checks to see where the provided array contains an item/value.
|
|
46
|
-
* If the array value is null, then -1 is returned.
|
|
47
|
-
* @param array
|
|
48
|
-
* @param item
|
|
49
|
-
* @param {function?} equalityComparer
|
|
50
|
-
* @returns {number}
|
|
51
|
-
*/
|
|
52
|
-
function indexOf(array, item, equalityComparer = compare_1.areEqual) {
|
|
53
|
-
const len = array && array.length;
|
|
54
|
-
if (len) {
|
|
55
|
-
// NaN NEVER evaluates its equality so be careful.
|
|
56
|
-
if (equalityComparer === compare_1.areEqual && array instanceof Array && !type_1.default.isTrueNaN(item))
|
|
57
|
-
return array.indexOf(item);
|
|
58
|
-
for (let i = 0; i < len; i++) {
|
|
59
|
-
// 'areEqual' includes NaN==NaN evaluation.
|
|
60
|
-
if (equalityComparer(array[i], item))
|
|
61
|
-
return i;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
return -1;
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Checks to see if the provided array contains an item.
|
|
68
|
-
* If the array value is null, then false is returned.
|
|
69
|
-
* @param array
|
|
70
|
-
* @param item
|
|
71
|
-
* @param {function?} equalityComparer
|
|
72
|
-
* @returns {boolean}
|
|
73
|
-
*/
|
|
74
|
-
function contains(array, item, equalityComparer = compare_1.areEqual) {
|
|
75
|
-
return indexOf(array, item, equalityComparer) !== -1;
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Finds and replaces a value from an array. Will replaces all instances unless a maximum is specified.
|
|
79
|
-
* @param array
|
|
80
|
-
* @param old
|
|
81
|
-
* @param newValue
|
|
82
|
-
* @param max
|
|
83
|
-
* @returns {number}
|
|
84
|
-
*/
|
|
85
|
-
function replace(array, old, newValue, max = Infinity) {
|
|
86
|
-
if (!array || !array.length || max === 0)
|
|
87
|
-
return 0;
|
|
88
|
-
if (max < 0)
|
|
89
|
-
throw new exceptions_1.ArgumentOutOfRangeException('max', max, CBL0);
|
|
90
|
-
if (!max)
|
|
91
|
-
max = Infinity; // just in case.
|
|
92
|
-
let count = 0;
|
|
93
|
-
for (let i = 0, len = array.length; i < len; i++) {
|
|
94
|
-
if (array[i] === old) {
|
|
95
|
-
array[i] = newValue;
|
|
96
|
-
++count;
|
|
97
|
-
if (count === max)
|
|
98
|
-
break;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
return count;
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
* Replaces values of an array across a range of indexes.
|
|
105
|
-
* @param array
|
|
106
|
-
* @param value
|
|
107
|
-
* @param start
|
|
108
|
-
* @param stop
|
|
109
|
-
*/
|
|
110
|
-
function updateRange(array, value, start = 0, stop) {
|
|
111
|
-
if (!array)
|
|
112
|
-
return;
|
|
113
|
-
integer_1.default.assertZeroOrGreater(start, 'start');
|
|
114
|
-
if (!stop && stop !== 0)
|
|
115
|
-
stop = array.length;
|
|
116
|
-
integer_1.default.assert(stop, 'stop');
|
|
117
|
-
if (stop < start)
|
|
118
|
-
throw new exceptions_1.ArgumentOutOfRangeException('stop', stop, 'is less than start');
|
|
119
|
-
for (let i = start; i < stop; i++) {
|
|
120
|
-
array[i] = value;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* Clears (sets to null) values of an array across a range of indexes.
|
|
125
|
-
* @param array
|
|
126
|
-
* @param start
|
|
127
|
-
* @param stop
|
|
128
|
-
*/
|
|
129
|
-
function clearEach(array, start = 0, stop) {
|
|
130
|
-
updateRange(array, null, start, stop);
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* Ensures a value exists within an array. If not found, adds to the end.
|
|
134
|
-
* @param array
|
|
135
|
-
* @param item
|
|
136
|
-
* @param {function?} equalityComparer
|
|
137
|
-
* @returns {boolean}
|
|
138
|
-
*/
|
|
139
|
-
function register(array, item, equalityComparer = compare_1.areEqual) {
|
|
140
|
-
if (!array)
|
|
141
|
-
throw new exceptions_1.ArgumentNullException('array', CBN);
|
|
142
|
-
const len = array.length; // avoid querying .length more than once. *
|
|
143
|
-
const ok = !len || !contains(array, item, equalityComparer);
|
|
144
|
-
if (ok)
|
|
145
|
-
array[len] = item; // * push would query length again.
|
|
146
|
-
return ok;
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* Returns the first index of which the provided predicate returns true.
|
|
150
|
-
* Returns -1 if always false.
|
|
151
|
-
* @param array
|
|
152
|
-
* @param predicate
|
|
153
|
-
* @returns {number}
|
|
154
|
-
*/
|
|
155
|
-
function findIndex(array, predicate) {
|
|
156
|
-
if (!array)
|
|
157
|
-
throw new exceptions_1.ArgumentNullException('array', CBN);
|
|
158
|
-
if (!type_1.default.isFunction(predicate))
|
|
159
|
-
throw new exceptions_1.ArgumentException('predicate', 'Must be a function.');
|
|
160
|
-
const len = array.length;
|
|
161
|
-
if (!type_1.default.isNumber(len, true) || len < 0)
|
|
162
|
-
throw new exceptions_1.ArgumentException('array', 'Does not have a valid length.');
|
|
163
|
-
if (array instanceof Array) {
|
|
164
|
-
for (let i = 0; i < len; i++) {
|
|
165
|
-
if (predicate(array[i], i))
|
|
166
|
-
return i;
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
else {
|
|
170
|
-
for (let i = 0; i < len; i++) {
|
|
171
|
-
if (i in array && predicate(array[i], i))
|
|
172
|
-
return i;
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
return -1;
|
|
176
|
-
}
|
|
177
|
-
/**
|
|
178
|
-
* Allows for using "false" to cause forEach to break.
|
|
179
|
-
* Can also be applied to a structure that indexes like an array, but may not be.
|
|
180
|
-
* @param source
|
|
181
|
-
* @param action
|
|
182
|
-
*/
|
|
183
|
-
function forEach(source, action) {
|
|
184
|
-
if (source && action != null) {
|
|
185
|
-
// Don't cache the length since it is possible that the underlying array changed.
|
|
186
|
-
for (let i = 0; i < source.length; i++) {
|
|
187
|
-
// noinspection PointlessBooleanExpressionJS
|
|
188
|
-
if (action(source[i], i) === false)
|
|
189
|
-
break;
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
/**
|
|
194
|
-
* Is similar to Array.map() but instead of returning a new array, it updates the existing indexes.
|
|
195
|
-
* Can also be applied to a structure that indexes like an array, but may not be.
|
|
196
|
-
* @param target
|
|
197
|
-
* @param fn
|
|
198
|
-
*/
|
|
199
|
-
function applyTo(target, fn) {
|
|
200
|
-
if (target && fn != null) {
|
|
201
|
-
for (let i = 0; i < target.length; i++) {
|
|
202
|
-
target[i] = fn(target[i], i);
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
/**
|
|
207
|
-
* Removes an entry at a specified index.
|
|
208
|
-
* @param array
|
|
209
|
-
* @param index
|
|
210
|
-
* @returns {boolean} True if the value was able to be removed.
|
|
211
|
-
*/
|
|
212
|
-
function removeIndex(array, index) {
|
|
213
|
-
if (!array)
|
|
214
|
-
throw new exceptions_1.ArgumentNullException('array', CBN);
|
|
215
|
-
integer_1.default.assert(index, 'index');
|
|
216
|
-
if (index < 0)
|
|
217
|
-
throw new exceptions_1.ArgumentOutOfRangeException('index', index, CBL0);
|
|
218
|
-
const exists = index < array.length;
|
|
219
|
-
if (exists)
|
|
220
|
-
array.splice(index, 1);
|
|
221
|
-
return exists;
|
|
222
|
-
}
|
|
223
|
-
/**
|
|
224
|
-
* Finds and removes a value from an array. Will remove all instances unless a maximum is specified.
|
|
225
|
-
* @param array
|
|
226
|
-
* @param value
|
|
227
|
-
* @param max
|
|
228
|
-
* @param {function?} equalityComparer
|
|
229
|
-
* @returns {number} The number of times the value was found and removed.
|
|
230
|
-
*/
|
|
231
|
-
function remove(array, value, max = Infinity, equalityComparer = compare_1.areEqual) {
|
|
232
|
-
if (!array || !array.length || max === 0)
|
|
233
|
-
return 0;
|
|
234
|
-
if (max < 0)
|
|
235
|
-
throw new exceptions_1.ArgumentOutOfRangeException('max', max, CBL0);
|
|
236
|
-
let count = 0;
|
|
237
|
-
if (!max || !isFinite(max)) {
|
|
238
|
-
// Don't track the indexes and remove in reverse.
|
|
239
|
-
for (let i = array.length - 1; i >= 0; i--) {
|
|
240
|
-
if (equalityComparer(array[i], value)) {
|
|
241
|
-
array.splice(i, 1);
|
|
242
|
-
++count;
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
else {
|
|
247
|
-
// Since the user will expect it to happen in forward order...
|
|
248
|
-
const found = []; // indexes;
|
|
249
|
-
for (let i = 0, len = array.length; i < len; i++) {
|
|
250
|
-
if (equalityComparer(array[i], value)) {
|
|
251
|
-
found.push(i);
|
|
252
|
-
++count;
|
|
253
|
-
if (count === max)
|
|
254
|
-
break;
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
for (let i = found.length - 1; i >= 0; i--) {
|
|
258
|
-
array.splice(found[i], 1);
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
return count;
|
|
262
|
-
}
|
|
263
|
-
/**
|
|
264
|
-
* Simply repeats a value the number of times specified.
|
|
265
|
-
* @param element
|
|
266
|
-
* @param count
|
|
267
|
-
* @returns {T[]}
|
|
268
|
-
*/
|
|
269
|
-
function repeat(element, count) {
|
|
270
|
-
integer_1.default.assert(count, 'count');
|
|
271
|
-
if (count < 0)
|
|
272
|
-
throw new exceptions_1.ArgumentOutOfRangeException('count', count, CBL0);
|
|
273
|
-
const result = (0, array_init_1.default)(count);
|
|
274
|
-
for (let i = 0; i < count; i++) {
|
|
275
|
-
result[i] = element;
|
|
276
|
-
}
|
|
277
|
-
return result;
|
|
278
|
-
}
|
|
279
|
-
/**
|
|
280
|
-
* Returns a range of numbers based upon the first value and the step value.
|
|
281
|
-
* @param first
|
|
282
|
-
* @param count
|
|
283
|
-
* @param step
|
|
284
|
-
* @returns {number[]}
|
|
285
|
-
*/
|
|
286
|
-
function range(first, count, step = 1) {
|
|
287
|
-
if (isNaN(first) || !isFinite(first))
|
|
288
|
-
throw new exceptions_1.ArgumentOutOfRangeException('first', first, VFN);
|
|
289
|
-
if (isNaN(count) || !isFinite(count))
|
|
290
|
-
throw new exceptions_1.ArgumentOutOfRangeException('count', count, VFN);
|
|
291
|
-
if (count < 0)
|
|
292
|
-
throw new exceptions_1.ArgumentOutOfRangeException('count', count, CBL0);
|
|
293
|
-
const result = (0, array_init_1.default)(count);
|
|
294
|
-
for (let i = 0; i < count; i++) {
|
|
295
|
-
result[i] = first;
|
|
296
|
-
first += step;
|
|
297
|
-
}
|
|
298
|
-
return result;
|
|
299
|
-
}
|
|
300
|
-
/**
|
|
301
|
-
* Returns a range of numbers based upon the first value and the step value excluding any numbers at or beyond the until value.
|
|
302
|
-
* @param first
|
|
303
|
-
* @param until
|
|
304
|
-
* @param step
|
|
305
|
-
* @returns {number[]}
|
|
306
|
-
*/
|
|
307
|
-
function rangeUntil(first, until, step = 1) {
|
|
308
|
-
if (step === 0)
|
|
309
|
-
throw new exceptions_1.ArgumentOutOfRangeException('step', step, CB0);
|
|
310
|
-
return range(first, (until - first) / step, step);
|
|
311
|
-
}
|
|
312
|
-
function distinct(source) {
|
|
313
|
-
if (!source)
|
|
314
|
-
return []; // Allowing for null facilitates regex filtering.
|
|
315
|
-
const seen = {};
|
|
316
|
-
return source.filter((e) => !(e in seen) && (seen[e] = true));
|
|
317
|
-
}
|
|
318
|
-
/**
|
|
319
|
-
* Takes any arrays within an array and inserts the values contained within in place of that array.
|
|
320
|
-
* For every count higher than 0 in recurseDepth it will attempt an additional pass. Passing Infinity will flatten all arrays contained.
|
|
321
|
-
* @param a
|
|
322
|
-
* @param recurseDepth
|
|
323
|
-
* @returns {any[]}
|
|
324
|
-
*/
|
|
325
|
-
function flatten(a, recurseDepth = 0) {
|
|
326
|
-
const result = [];
|
|
327
|
-
for (let x of a) {
|
|
328
|
-
if (x instanceof Array) {
|
|
329
|
-
if (recurseDepth > 0)
|
|
330
|
-
x = flatten(x, recurseDepth - 1);
|
|
331
|
-
for (const e of x)
|
|
332
|
-
result.push(e);
|
|
333
|
-
}
|
|
334
|
-
else
|
|
335
|
-
result.push(x);
|
|
336
|
-
}
|
|
337
|
-
return result;
|
|
338
|
-
}
|
|
339
|
-
});
|
|
340
|
-
//# sourceMappingURL=arrayUtility.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"arrayUtility.js","sourceRoot":"","sources":["../../src/arrayUtility.ts"],"names":[],"mappings":"AAAA;;;GAGG;;;;;;;;;;;;;IAkCH,0BAqBC;IAUD,4BAOC;IAUD,0BAwBC;IASD,kCAiBC;IAQD,8BAOC;IASD,4BAWC;IASD,8BA2BC;IAQD,0BAcC;IAQD,0BAYC;IAQD,kCAaC;IAUD,wBA4CC;IAQD,wBAeC;IASD,sBAkBC;IASD,gCAQC;IAQD,4BAKC;IASD,0BAgBC;;IAtaD,qDAA2G;IAC3G,8EAAwC;IAOhC,eAPD,oBAAI,CAOC;IANZ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