@danielsimonjr/mathts-core 0.15.1 → 0.15.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.
- package/dist/array.d.ts +23 -23
- package/dist/bignumber-formatter.d.ts +2 -2
- package/dist/index.js +13 -13
- package/dist/internal.js +3 -10
- package/dist/is.d.ts +1 -1
- package/dist/map.d.ts.map +1 -1
- package/dist/object.d.ts +13 -13
- package/dist/types/matrix/Range.d.ts +64 -64
- package/package.json +2 -2
package/dist/array.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export interface IdentifiedValue<T> {
|
|
|
18
18
|
* This function checks the size of the first entry, it does not validate
|
|
19
19
|
* whether all dimensions match. (use function `validate` for that)
|
|
20
20
|
* @param x
|
|
21
|
-
* @return
|
|
21
|
+
* @return size
|
|
22
22
|
*/
|
|
23
23
|
export declare function arraySize<T>(x: NestedArray<T>): number[];
|
|
24
24
|
/**
|
|
@@ -56,17 +56,17 @@ export declare function isEmptyIndex(index: Index): boolean;
|
|
|
56
56
|
* zero by default. Specify for example `null`,
|
|
57
57
|
* to clearly see entries that are not explicitly
|
|
58
58
|
* set.
|
|
59
|
-
* @return
|
|
59
|
+
* @return array The resized array
|
|
60
60
|
*/
|
|
61
61
|
export declare function resize<T = unknown>(array: T | T[] | NestedArray<T>, size: number[], defaultValue?: T): NestedArray<T>;
|
|
62
62
|
/**
|
|
63
63
|
* Re-shape a multi dimensional array to fit the specified dimensions
|
|
64
64
|
* @param array - Array to be reshaped
|
|
65
65
|
* @param sizes - List of sizes for each dimension
|
|
66
|
-
* @returns
|
|
66
|
+
* @returns Array whose data has been formatted to fit the
|
|
67
67
|
* specified dimensions
|
|
68
68
|
*
|
|
69
|
-
* @throws
|
|
69
|
+
* @throws DimensionError If the product of the new dimension sizes does
|
|
70
70
|
* not equal that of the old ones
|
|
71
71
|
*/
|
|
72
72
|
export declare function reshape<T = unknown>(array: NestedArray<T>, sizes: number[]): NestedArray<T>;
|
|
@@ -74,15 +74,15 @@ export declare function reshape<T = unknown>(array: NestedArray<T>, sizes: numbe
|
|
|
74
74
|
* Replaces the wildcard -1 in the sizes array.
|
|
75
75
|
* @param sizes - List of sizes for each dimension. At most one wildcard.
|
|
76
76
|
* @param currentLength - Number of elements in the array.
|
|
77
|
-
* @throws
|
|
78
|
-
* @returns
|
|
77
|
+
* @throws Error If more than one wildcard or unable to replace it.
|
|
78
|
+
* @returns The sizes array with wildcard replaced.
|
|
79
79
|
*/
|
|
80
80
|
export declare function processSizesWildcard(sizes: number[], currentLength: number): number[];
|
|
81
81
|
/**
|
|
82
82
|
* Squeeze a multi dimensional array
|
|
83
83
|
* @param array
|
|
84
84
|
* @param size - Optional.
|
|
85
|
-
* @returns
|
|
85
|
+
* @returns returns the array itself
|
|
86
86
|
*/
|
|
87
87
|
export declare function squeeze<T>(array: NestedArray<T>, size?: number[]): T | NestedArray<T>;
|
|
88
88
|
/**
|
|
@@ -94,7 +94,7 @@ export declare function squeeze<T>(array: NestedArray<T>, size?: number[]): T |
|
|
|
94
94
|
* @param dims - Desired number of dimensions of the array
|
|
95
95
|
* @param outer - Optional. Number of outer dimensions to be added
|
|
96
96
|
* @param size - Optional. Current size of array.
|
|
97
|
-
* @returns
|
|
97
|
+
* @returns returns the array itself
|
|
98
98
|
* @private
|
|
99
99
|
*/
|
|
100
100
|
export declare function unsqueeze<T>(array: NestedArray<T>, dims: number, outer?: number, size?: number[]): NestedArray<T>;
|
|
@@ -103,7 +103,7 @@ export declare function unsqueeze<T>(array: NestedArray<T>, dims: number, outer?
|
|
|
103
103
|
* array
|
|
104
104
|
* @param array - A multi dimensional array
|
|
105
105
|
* @param isRectangular - Optional. If the array is rectangular (not jagged)
|
|
106
|
-
* @return
|
|
106
|
+
* @return The flattened array (1 dimensional)
|
|
107
107
|
*/
|
|
108
108
|
export declare function flatten<T>(array: NestedArray<T>, isRectangular?: boolean): T[];
|
|
109
109
|
/**
|
|
@@ -128,7 +128,7 @@ export declare function filter<T>(array: T[], callback: (value: T, index: number
|
|
|
128
128
|
* Filter values in an array given a regular expression
|
|
129
129
|
* @param array
|
|
130
130
|
* @param regexp
|
|
131
|
-
* @return
|
|
131
|
+
* @return Returns the filtered array
|
|
132
132
|
* @private
|
|
133
133
|
*/
|
|
134
134
|
export declare function filterRegExp(array: string[], regexp: RegExp): string[];
|
|
@@ -141,13 +141,13 @@ export declare function join<T>(array: T[], separator: string): string;
|
|
|
141
141
|
/**
|
|
142
142
|
* Assign a numeric identifier to every element of a sorted array
|
|
143
143
|
* @param a - An array
|
|
144
|
-
* @return
|
|
144
|
+
* @return An array of objects containing the original value and its identifier
|
|
145
145
|
*/
|
|
146
146
|
export declare function identify<T>(a: T[]): IdentifiedValue<T>[];
|
|
147
147
|
/**
|
|
148
148
|
* Remove the numeric identifier from the elements
|
|
149
149
|
* @param a - An array
|
|
150
|
-
* @return
|
|
150
|
+
* @return An array of values without identifiers
|
|
151
151
|
*/
|
|
152
152
|
export declare function generalize<T>(a: IdentifiedValue<T>[]): T[];
|
|
153
153
|
/**
|
|
@@ -157,13 +157,13 @@ export declare function generalize<T>(a: IdentifiedValue<T>[]): T[];
|
|
|
157
157
|
* This method does not validate Array Matrix shape
|
|
158
158
|
* @param array
|
|
159
159
|
* @param typeOf - Callback function to use to determine the type of a value
|
|
160
|
-
* @return
|
|
160
|
+
* @return
|
|
161
161
|
*/
|
|
162
162
|
export declare function getArrayDataType(array: unknown[], typeOf: (value: unknown) => string): string | undefined;
|
|
163
163
|
/**
|
|
164
164
|
* Return the last item from an array
|
|
165
165
|
* @param array
|
|
166
|
-
* @returns
|
|
166
|
+
* @returns
|
|
167
167
|
*/
|
|
168
168
|
export declare function last<T>(array: T[]): T;
|
|
169
169
|
/**
|
|
@@ -174,7 +174,7 @@ export declare function last<T>(array: T[]): T;
|
|
|
174
174
|
* even in expression (unused outside its own definition). Re-exported from
|
|
175
175
|
* expression's shim only — see the module header.
|
|
176
176
|
* @param array
|
|
177
|
-
* @returns
|
|
177
|
+
* @returns
|
|
178
178
|
*/
|
|
179
179
|
export declare function initial<T>(array: T[]): T[];
|
|
180
180
|
/**
|
|
@@ -183,14 +183,14 @@ export declare function initial<T>(array: T[]): T[];
|
|
|
183
183
|
* With one array, the function returns that array without a copy.
|
|
184
184
|
*
|
|
185
185
|
* @param args - All the arrays to concatenate, then the dimension on which to concatenate (zero-based) as the last element
|
|
186
|
-
* @returns
|
|
186
|
+
* @returns
|
|
187
187
|
* @throws Error when `args` contains no array.
|
|
188
188
|
*/
|
|
189
189
|
export declare function concat<T>(...args: [...NestedArray<T>[], number]): NestedArray<T>[];
|
|
190
190
|
/**
|
|
191
191
|
* Receives two or more sizes and gets the broadcasted size for both.
|
|
192
192
|
* @param sizes - Sizes to broadcast together
|
|
193
|
-
* @returns
|
|
193
|
+
* @returns The broadcasted size
|
|
194
194
|
*/
|
|
195
195
|
export declare function broadcastSizes(...sizes: number[][]): number[];
|
|
196
196
|
/**
|
|
@@ -203,13 +203,13 @@ export declare function checkBroadcastingRules(size: number[], toSize: number[])
|
|
|
203
203
|
* Broadcasts a single array to a certain size
|
|
204
204
|
* @param array - Array to be broadcasted
|
|
205
205
|
* @param toSize - Size to broadcast the array
|
|
206
|
-
* @returns
|
|
206
|
+
* @returns The broadcasted array
|
|
207
207
|
*/
|
|
208
208
|
export declare function broadcastTo<T>(array: NestedArray<T>, toSize: number[]): NestedArray<T>;
|
|
209
209
|
/**
|
|
210
210
|
* Broadcasts arrays and returns the broadcasted arrays in an array
|
|
211
211
|
* @param arrays
|
|
212
|
-
* @returns
|
|
212
|
+
* @returns The broadcasted arrays
|
|
213
213
|
*/
|
|
214
214
|
export declare function broadcastArrays<T>(...arrays: NestedArray<T>[]): NestedArray<T>[];
|
|
215
215
|
/**
|
|
@@ -217,7 +217,7 @@ export declare function broadcastArrays<T>(...arrays: NestedArray<T>[]): NestedA
|
|
|
217
217
|
* @param arrayToStretch
|
|
218
218
|
* @param sizeToStretch
|
|
219
219
|
* @param dimToStretch
|
|
220
|
-
* @returns
|
|
220
|
+
* @returns The stretched array
|
|
221
221
|
*/
|
|
222
222
|
export declare function stretch<T>(arrayToStretch: NestedArray<T>, sizeToStretch: number, dimToStretch: number): NestedArray<T>;
|
|
223
223
|
/**
|
|
@@ -225,7 +225,7 @@ export declare function stretch<T>(arrayToStretch: NestedArray<T>, sizeToStretch
|
|
|
225
225
|
*
|
|
226
226
|
* @param array - The array from which to retrieve the value.
|
|
227
227
|
* @param index - An array of indices specifying the position of the desired element in each dimension.
|
|
228
|
-
* @returns
|
|
228
|
+
* @returns - The value at the specified position in the array.
|
|
229
229
|
*
|
|
230
230
|
* @example
|
|
231
231
|
* const arr = [[[1, 2], [3, 4]], [[5, 6], [7, 8]]];
|
|
@@ -242,7 +242,7 @@ export declare function get<T>(array: NestedArray<T>, index: number[]): T;
|
|
|
242
242
|
* - `index` (Array<number>): The index of the current element being processed in the array.
|
|
243
243
|
* - `array` (Array): The array `deepMap` was called upon.
|
|
244
244
|
* @param skipIndex - Optional. Default is false. If true, the callback function is called with only the value.
|
|
245
|
-
* @returns
|
|
245
|
+
* @returns A new array with each element being the result of the callback function.
|
|
246
246
|
*/
|
|
247
247
|
export declare function deepMap<T, U>(array: NestedArray<T>, callback: ((value: T, index: number[], array: NestedArray<T>) => U) | ((value: T) => U), skipIndex?: boolean): NestedArray<U>;
|
|
248
248
|
/**
|
|
@@ -259,7 +259,7 @@ export declare function deepForEach<T>(array: NestedArray<T>, callback: ((value:
|
|
|
259
259
|
/**
|
|
260
260
|
* Deep clones a multidimensional array
|
|
261
261
|
* @param array
|
|
262
|
-
* @returns
|
|
262
|
+
* @returns cloned array
|
|
263
263
|
*/
|
|
264
264
|
export declare function clone<T>(array: T[]): T[];
|
|
265
265
|
//# sourceMappingURL=array.d.ts.map
|
|
@@ -107,7 +107,7 @@ export interface BigNumberValue {
|
|
|
107
107
|
*
|
|
108
108
|
* @param value
|
|
109
109
|
* @param options - Optional.
|
|
110
|
-
* @return
|
|
110
|
+
* @return str The formatted value
|
|
111
111
|
*/
|
|
112
112
|
export declare function format(value: unknown, options?: unknown): string;
|
|
113
113
|
/**
|
|
@@ -122,7 +122,7 @@ export declare function toEngineering(value: BigNumberValue, precision?: number)
|
|
|
122
122
|
* @param precision - Optional. Number of digits in formatted output.
|
|
123
123
|
* If not provided, the maximum available digits
|
|
124
124
|
* is used.
|
|
125
|
-
* @returns
|
|
125
|
+
* @returns str
|
|
126
126
|
*/
|
|
127
127
|
export declare function toExponential(value: BigNumberValue, precision?: number): string;
|
|
128
128
|
/**
|
package/dist/index.js
CHANGED
|
@@ -150,7 +150,7 @@ var createRangeClass = /* @__PURE__ */ factory(
|
|
|
150
150
|
* For example str='0:2:11'.
|
|
151
151
|
* @memberof Range
|
|
152
152
|
* @param str
|
|
153
|
-
* @return
|
|
153
|
+
* @return range
|
|
154
154
|
*/
|
|
155
155
|
static parse(str) {
|
|
156
156
|
if (typeof str !== "string") {
|
|
@@ -177,7 +177,7 @@ var createRangeClass = /* @__PURE__ */ factory(
|
|
|
177
177
|
}
|
|
178
178
|
/**
|
|
179
179
|
* Create a clone of the range
|
|
180
|
-
* @return
|
|
180
|
+
* @return clone
|
|
181
181
|
*/
|
|
182
182
|
clone() {
|
|
183
183
|
return new Range2(this.start, this.end, this.step);
|
|
@@ -186,7 +186,7 @@ var createRangeClass = /* @__PURE__ */ factory(
|
|
|
186
186
|
* Retrieve the size of the range.
|
|
187
187
|
* Returns an array containing one number, the number of elements in the range.
|
|
188
188
|
* @memberof Range
|
|
189
|
-
* @returns
|
|
189
|
+
* @returns size
|
|
190
190
|
*/
|
|
191
191
|
size() {
|
|
192
192
|
let len = 0;
|
|
@@ -207,7 +207,7 @@ var createRangeClass = /* @__PURE__ */ factory(
|
|
|
207
207
|
/**
|
|
208
208
|
* Calculate the minimum value in the range
|
|
209
209
|
* @memberof Range
|
|
210
|
-
* @return
|
|
210
|
+
* @return min
|
|
211
211
|
*/
|
|
212
212
|
min() {
|
|
213
213
|
const size = this.size()[0];
|
|
@@ -224,7 +224,7 @@ var createRangeClass = /* @__PURE__ */ factory(
|
|
|
224
224
|
/**
|
|
225
225
|
* Calculate the maximum value in the range
|
|
226
226
|
* @memberof Range
|
|
227
|
-
* @return
|
|
227
|
+
* @return max
|
|
228
228
|
*/
|
|
229
229
|
max() {
|
|
230
230
|
const size = this.size()[0];
|
|
@@ -271,7 +271,7 @@ var createRangeClass = /* @__PURE__ */ factory(
|
|
|
271
271
|
* @param callback - The callback method is invoked with three
|
|
272
272
|
* parameters: the value of the element, the index
|
|
273
273
|
* of the element, and the Matrix being traversed.
|
|
274
|
-
* @returns
|
|
274
|
+
* @returns array
|
|
275
275
|
*/
|
|
276
276
|
map(callback) {
|
|
277
277
|
const array = [];
|
|
@@ -283,7 +283,7 @@ var createRangeClass = /* @__PURE__ */ factory(
|
|
|
283
283
|
/**
|
|
284
284
|
* Create an Array with a copy of the Ranges data
|
|
285
285
|
* @memberof Range
|
|
286
|
-
* @returns
|
|
286
|
+
* @returns array
|
|
287
287
|
*/
|
|
288
288
|
toArray() {
|
|
289
289
|
const array = [];
|
|
@@ -295,7 +295,7 @@ var createRangeClass = /* @__PURE__ */ factory(
|
|
|
295
295
|
/**
|
|
296
296
|
* Get the primitive value of the Range, a one dimensional array
|
|
297
297
|
* @memberof Range
|
|
298
|
-
* @returns
|
|
298
|
+
* @returns array
|
|
299
299
|
*/
|
|
300
300
|
valueOf() {
|
|
301
301
|
if (this._cache !== null && this.start === this._cacheStart && this.end === this._cacheEnd && this.step === this._cacheStep) {
|
|
@@ -315,7 +315,7 @@ var createRangeClass = /* @__PURE__ */ factory(
|
|
|
315
315
|
* lib/utils/number:format for a
|
|
316
316
|
* description of the available
|
|
317
317
|
* options.
|
|
318
|
-
* @returns
|
|
318
|
+
* @returns str
|
|
319
319
|
*/
|
|
320
320
|
format(options) {
|
|
321
321
|
let str = format(this.start, options);
|
|
@@ -328,7 +328,7 @@ var createRangeClass = /* @__PURE__ */ factory(
|
|
|
328
328
|
/**
|
|
329
329
|
* Get a string representation of the range.
|
|
330
330
|
* @memberof Range
|
|
331
|
-
* @returns
|
|
331
|
+
* @returns
|
|
332
332
|
*/
|
|
333
333
|
toString() {
|
|
334
334
|
return this.format();
|
|
@@ -336,7 +336,7 @@ var createRangeClass = /* @__PURE__ */ factory(
|
|
|
336
336
|
/**
|
|
337
337
|
* Get a JSON representation of the range
|
|
338
338
|
* @memberof Range
|
|
339
|
-
* @returns
|
|
339
|
+
* @returns Returns a JSON object structured as:
|
|
340
340
|
* `{"mathjs": "Range", "start": 2, "end": 4, "step": 1}`
|
|
341
341
|
*/
|
|
342
342
|
toJSON() {
|
|
@@ -352,7 +352,7 @@ var createRangeClass = /* @__PURE__ */ factory(
|
|
|
352
352
|
* @memberof Range
|
|
353
353
|
* @param json - A JSON object structured as:
|
|
354
354
|
* `{"mathjs": "Range", "start": 2, "end": 4, "step": 1}`
|
|
355
|
-
* @return
|
|
355
|
+
* @return
|
|
356
356
|
*/
|
|
357
357
|
static fromJSON(json) {
|
|
358
358
|
return new Range2(json.start, json.end, json.step);
|
|
@@ -1386,7 +1386,7 @@ function neumaierCumsum(xs, out) {
|
|
|
1386
1386
|
}
|
|
1387
1387
|
|
|
1388
1388
|
// src/index.ts
|
|
1389
|
-
var VERSION = "0.15.
|
|
1389
|
+
var VERSION = "0.15.3";
|
|
1390
1390
|
export {
|
|
1391
1391
|
ALL_UNITS,
|
|
1392
1392
|
BASE_UNITS,
|
package/dist/internal.js
CHANGED
|
@@ -1334,16 +1334,9 @@ var PartitionedMap = class {
|
|
|
1334
1334
|
return [...this.keys()].length;
|
|
1335
1335
|
}
|
|
1336
1336
|
};
|
|
1337
|
-
function mapIterator(it, callback) {
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
const n = it.next();
|
|
1341
|
-
return n.done ? n : {
|
|
1342
|
-
value: callback(n.value),
|
|
1343
|
-
done: false
|
|
1344
|
-
};
|
|
1345
|
-
}
|
|
1346
|
-
};
|
|
1337
|
+
function* mapIterator(it, callback) {
|
|
1338
|
+
for (const value of it) yield callback(value);
|
|
1339
|
+
return void 0;
|
|
1347
1340
|
}
|
|
1348
1341
|
function createEmptyMap() {
|
|
1349
1342
|
return /* @__PURE__ */ new Map();
|
package/dist/is.d.ts
CHANGED
|
@@ -153,7 +153,7 @@ export declare function isMatrix(x: unknown): x is Matrix;
|
|
|
153
153
|
/**
|
|
154
154
|
* Test whether a value is a collection: an Array or Matrix
|
|
155
155
|
* @param x
|
|
156
|
-
* @returns
|
|
156
|
+
* @returns isCollection
|
|
157
157
|
*/
|
|
158
158
|
export declare function isCollection(x: unknown): x is unknown[] | Matrix;
|
|
159
159
|
/**
|
package/dist/map.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"map.d.ts","sourceRoot":"","sources":["../src/map.ts"],"names":[],"mappings":"AAmCA;;;;;;;GAOG;AACH;;;;;GAKG;AACH,KAAK,gBAAgB,CAAC,CAAC,EAAE,CAAC,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;AAE5E,wFAAwF;AACxF,KAAK,cAAc,CAAC,CAAC,EAAE,CAAC,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAE1D,0FAA0F;AAC1F,KAAK,gBAAgB,CAAC,CAAC,EAAE,CAAC,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;AAE9D,2FAA2F;AAC3F,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;AAEjE;;;;;GAKG;AACH,qBAAa,iBAAiB,CAAC,CAAC,GAAG,MAAM,EAAE,CAAC,GAAG,OAAO,C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
|
8
8
|
* If x has a function clone, this function will be invoked to clone the object.
|
|
9
9
|
*
|
|
10
10
|
* @param x
|
|
11
|
-
* @return
|
|
11
|
+
* @return clone
|
|
12
12
|
*/
|
|
13
13
|
export declare function clone<T>(x: T): T;
|
|
14
14
|
/**
|
|
15
15
|
* Apply map to all properties of an object
|
|
16
16
|
* @param object
|
|
17
17
|
* @param callback
|
|
18
|
-
* @return
|
|
18
|
+
* @return Returns a copy of the object with mapped properties
|
|
19
19
|
*/
|
|
20
20
|
export declare function mapObject<T, U>(object: Record<string, T>, callback: (value: T) => U): Record<string, U>;
|
|
21
21
|
/**
|
|
22
22
|
* Extend object a with the properties of object b
|
|
23
23
|
* @param a
|
|
24
24
|
* @param b
|
|
25
|
-
* @return
|
|
25
|
+
* @return a
|
|
26
26
|
*/
|
|
27
27
|
export declare function extend<T extends Record<string, unknown>, U extends Record<string, unknown>>(a: T, b: U): T & U;
|
|
28
28
|
/**
|
|
29
29
|
* Deep extend an object a with the properties of object b
|
|
30
30
|
* @param a
|
|
31
31
|
* @param b
|
|
32
|
-
* @returns
|
|
32
|
+
* @returns
|
|
33
33
|
*/
|
|
34
34
|
export declare function deepExtend<T>(a: T, b: unknown): T;
|
|
35
35
|
/**
|
|
@@ -37,18 +37,18 @@ export declare function deepExtend<T>(a: T, b: unknown): T;
|
|
|
37
37
|
* Compares values and functions strictly (ie. 2 is not the same as '2').
|
|
38
38
|
* @param a
|
|
39
39
|
* @param b
|
|
40
|
-
* @returns
|
|
40
|
+
* @returns
|
|
41
41
|
*/
|
|
42
42
|
export declare function deepStrictEqual(a: unknown, b: unknown): boolean;
|
|
43
43
|
/**
|
|
44
44
|
* Recursively flatten a nested object.
|
|
45
45
|
* @param nestedObject
|
|
46
|
-
* @return
|
|
46
|
+
* @return Returns the flattened object
|
|
47
47
|
*/
|
|
48
48
|
export declare function deepFlatten(nestedObject: Record<string, unknown>): Record<string, unknown>;
|
|
49
49
|
/**
|
|
50
50
|
* Test whether the current JavaScript engine supports Object.defineProperty
|
|
51
|
-
* @returns
|
|
51
|
+
* @returns returns true if supported
|
|
52
52
|
*/
|
|
53
53
|
export declare function canDefineProperty(): boolean;
|
|
54
54
|
/**
|
|
@@ -66,7 +66,7 @@ export declare function lazy<T>(object: Record<string, unknown>, prop: string, v
|
|
|
66
66
|
* When a namespace is missing, it will be created
|
|
67
67
|
* @param object
|
|
68
68
|
* @param path - A dot separated string like 'name.space'
|
|
69
|
-
* @return
|
|
69
|
+
* @return Returns the object at the end of the path
|
|
70
70
|
*/
|
|
71
71
|
export declare function traverse(object: Record<string, unknown>, path: string | string[]): Record<string, unknown>;
|
|
72
72
|
export { hasOwnProperty };
|
|
@@ -80,14 +80,14 @@ export { hasOwnProperty };
|
|
|
80
80
|
* as fifth argument of the factory function
|
|
81
81
|
*
|
|
82
82
|
* @param object
|
|
83
|
-
* @returns
|
|
83
|
+
* @returns
|
|
84
84
|
*/
|
|
85
85
|
export declare function isLegacyFactory(object: unknown): boolean;
|
|
86
86
|
/**
|
|
87
87
|
* Get a nested property from an object
|
|
88
88
|
* @param object
|
|
89
89
|
* @param path
|
|
90
|
-
* @returns
|
|
90
|
+
* @returns
|
|
91
91
|
*/
|
|
92
92
|
export declare function get(object: Record<string, unknown>, path: string | string[]): unknown;
|
|
93
93
|
/**
|
|
@@ -97,7 +97,7 @@ export declare function get(object: Record<string, unknown>, path: string | stri
|
|
|
97
97
|
* @param object
|
|
98
98
|
* @param path
|
|
99
99
|
* @param value
|
|
100
|
-
* @returns
|
|
100
|
+
* @returns
|
|
101
101
|
*/
|
|
102
102
|
export declare function set<T extends Record<string, unknown>>(object: T, path: string | string[], value: unknown): T;
|
|
103
103
|
/**
|
|
@@ -105,7 +105,7 @@ export declare function set<T extends Record<string, unknown>>(object: T, path:
|
|
|
105
105
|
* @param object
|
|
106
106
|
* @param properties
|
|
107
107
|
* @param transform - Optional value to transform a value when picking it
|
|
108
|
-
* @return
|
|
108
|
+
* @return
|
|
109
109
|
*/
|
|
110
110
|
export declare function pick(object: Record<string, unknown>, properties: string[], transform?: (value: unknown, key: string) => unknown): Record<string, unknown>;
|
|
111
111
|
/**
|
|
@@ -113,7 +113,7 @@ export declare function pick(object: Record<string, unknown>, properties: string
|
|
|
113
113
|
* but not for nested properties
|
|
114
114
|
* @param object
|
|
115
115
|
* @param properties
|
|
116
|
-
* @return
|
|
116
|
+
* @return
|
|
117
117
|
*/
|
|
118
118
|
export declare function pickShallow(object: Record<string, unknown>, properties: string[]): Record<string, unknown>;
|
|
119
119
|
//# sourceMappingURL=object.d.ts.map
|
|
@@ -66,26 +66,26 @@ export declare const createRangeClass: import("../../factory.js").FactoryFunctio
|
|
|
66
66
|
_cacheStep?: number;
|
|
67
67
|
/**
|
|
68
68
|
* Create a clone of the range
|
|
69
|
-
* @return
|
|
69
|
+
* @return clone
|
|
70
70
|
*/
|
|
71
71
|
clone(): /*elided*/ any;
|
|
72
72
|
/**
|
|
73
73
|
* Retrieve the size of the range.
|
|
74
74
|
* Returns an array containing one number, the number of elements in the range.
|
|
75
75
|
* @memberof Range
|
|
76
|
-
* @returns
|
|
76
|
+
* @returns size
|
|
77
77
|
*/
|
|
78
78
|
size(): number[];
|
|
79
79
|
/**
|
|
80
80
|
* Calculate the minimum value in the range
|
|
81
81
|
* @memberof Range
|
|
82
|
-
* @return
|
|
82
|
+
* @return min
|
|
83
83
|
*/
|
|
84
84
|
min(): number | undefined;
|
|
85
85
|
/**
|
|
86
86
|
* Calculate the maximum value in the range
|
|
87
87
|
* @memberof Range
|
|
88
|
-
* @return
|
|
88
|
+
* @return max
|
|
89
89
|
*/
|
|
90
90
|
max(): number | undefined;
|
|
91
91
|
/**
|
|
@@ -103,19 +103,19 @@ export declare const createRangeClass: import("../../factory.js").FactoryFunctio
|
|
|
103
103
|
* @param callback - The callback method is invoked with three
|
|
104
104
|
* parameters: the value of the element, the index
|
|
105
105
|
* of the element, and the Matrix being traversed.
|
|
106
|
-
* @returns
|
|
106
|
+
* @returns array
|
|
107
107
|
*/
|
|
108
108
|
map<T>(callback: RangeMapCallback<T>): T[];
|
|
109
109
|
/**
|
|
110
110
|
* Create an Array with a copy of the Ranges data
|
|
111
111
|
* @memberof Range
|
|
112
|
-
* @returns
|
|
112
|
+
* @returns array
|
|
113
113
|
*/
|
|
114
114
|
toArray(): number[];
|
|
115
115
|
/**
|
|
116
116
|
* Get the primitive value of the Range, a one dimensional array
|
|
117
117
|
* @memberof Range
|
|
118
|
-
* @returns
|
|
118
|
+
* @returns array
|
|
119
119
|
*/
|
|
120
120
|
valueOf(): number[];
|
|
121
121
|
/**
|
|
@@ -126,19 +126,19 @@ export declare const createRangeClass: import("../../factory.js").FactoryFunctio
|
|
|
126
126
|
* lib/utils/number:format for a
|
|
127
127
|
* description of the available
|
|
128
128
|
* options.
|
|
129
|
-
* @returns
|
|
129
|
+
* @returns str
|
|
130
130
|
*/
|
|
131
131
|
format(options?: RangeFormatOptions | number | ((value: number) => string)): string;
|
|
132
132
|
/**
|
|
133
133
|
* Get a string representation of the range.
|
|
134
134
|
* @memberof Range
|
|
135
|
-
* @returns
|
|
135
|
+
* @returns
|
|
136
136
|
*/
|
|
137
137
|
toString(): string;
|
|
138
138
|
/**
|
|
139
139
|
* Get a JSON representation of the range
|
|
140
140
|
* @memberof Range
|
|
141
|
-
* @returns
|
|
141
|
+
* @returns Returns a JSON object structured as:
|
|
142
142
|
* `{"mathjs": "Range", "start": 2, "end": 4, "step": 1}`
|
|
143
143
|
*/
|
|
144
144
|
toJSON(): RangeJSON;
|
|
@@ -150,7 +150,7 @@ export declare const createRangeClass: import("../../factory.js").FactoryFunctio
|
|
|
150
150
|
* For example str='0:2:11'.
|
|
151
151
|
* @memberof Range
|
|
152
152
|
* @param str
|
|
153
|
-
* @return
|
|
153
|
+
* @return range
|
|
154
154
|
*/
|
|
155
155
|
parse(str: string): {
|
|
156
156
|
/**
|
|
@@ -191,26 +191,26 @@ export declare const createRangeClass: import("../../factory.js").FactoryFunctio
|
|
|
191
191
|
_cacheStep?: number;
|
|
192
192
|
/**
|
|
193
193
|
* Create a clone of the range
|
|
194
|
-
* @return
|
|
194
|
+
* @return clone
|
|
195
195
|
*/
|
|
196
196
|
clone(): /*elided*/ any;
|
|
197
197
|
/**
|
|
198
198
|
* Retrieve the size of the range.
|
|
199
199
|
* Returns an array containing one number, the number of elements in the range.
|
|
200
200
|
* @memberof Range
|
|
201
|
-
* @returns
|
|
201
|
+
* @returns size
|
|
202
202
|
*/
|
|
203
203
|
size(): number[];
|
|
204
204
|
/**
|
|
205
205
|
* Calculate the minimum value in the range
|
|
206
206
|
* @memberof Range
|
|
207
|
-
* @return
|
|
207
|
+
* @return min
|
|
208
208
|
*/
|
|
209
209
|
min(): number | undefined;
|
|
210
210
|
/**
|
|
211
211
|
* Calculate the maximum value in the range
|
|
212
212
|
* @memberof Range
|
|
213
|
-
* @return
|
|
213
|
+
* @return max
|
|
214
214
|
*/
|
|
215
215
|
max(): number | undefined;
|
|
216
216
|
/**
|
|
@@ -228,19 +228,19 @@ export declare const createRangeClass: import("../../factory.js").FactoryFunctio
|
|
|
228
228
|
* @param callback - The callback method is invoked with three
|
|
229
229
|
* parameters: the value of the element, the index
|
|
230
230
|
* of the element, and the Matrix being traversed.
|
|
231
|
-
* @returns
|
|
231
|
+
* @returns array
|
|
232
232
|
*/
|
|
233
233
|
map<T>(callback: RangeMapCallback<T>): T[];
|
|
234
234
|
/**
|
|
235
235
|
* Create an Array with a copy of the Ranges data
|
|
236
236
|
* @memberof Range
|
|
237
|
-
* @returns
|
|
237
|
+
* @returns array
|
|
238
238
|
*/
|
|
239
239
|
toArray(): number[];
|
|
240
240
|
/**
|
|
241
241
|
* Get the primitive value of the Range, a one dimensional array
|
|
242
242
|
* @memberof Range
|
|
243
|
-
* @returns
|
|
243
|
+
* @returns array
|
|
244
244
|
*/
|
|
245
245
|
valueOf(): number[];
|
|
246
246
|
/**
|
|
@@ -251,19 +251,19 @@ export declare const createRangeClass: import("../../factory.js").FactoryFunctio
|
|
|
251
251
|
* lib/utils/number:format for a
|
|
252
252
|
* description of the available
|
|
253
253
|
* options.
|
|
254
|
-
* @returns
|
|
254
|
+
* @returns str
|
|
255
255
|
*/
|
|
256
256
|
format(options?: RangeFormatOptions | number | ((value: number) => string)): string;
|
|
257
257
|
/**
|
|
258
258
|
* Get a string representation of the range.
|
|
259
259
|
* @memberof Range
|
|
260
|
-
* @returns
|
|
260
|
+
* @returns
|
|
261
261
|
*/
|
|
262
262
|
toString(): string;
|
|
263
263
|
/**
|
|
264
264
|
* Get a JSON representation of the range
|
|
265
265
|
* @memberof Range
|
|
266
|
-
* @returns
|
|
266
|
+
* @returns Returns a JSON object structured as:
|
|
267
267
|
* `{"mathjs": "Range", "start": 2, "end": 4, "step": 1}`
|
|
268
268
|
*/
|
|
269
269
|
toJSON(): RangeJSON;
|
|
@@ -273,7 +273,7 @@ export declare const createRangeClass: import("../../factory.js").FactoryFunctio
|
|
|
273
273
|
* @memberof Range
|
|
274
274
|
* @param json - A JSON object structured as:
|
|
275
275
|
* `{"mathjs": "Range", "start": 2, "end": 4, "step": 1}`
|
|
276
|
-
* @return
|
|
276
|
+
* @return
|
|
277
277
|
*/
|
|
278
278
|
fromJSON(json: RangeJSON): {
|
|
279
279
|
/**
|
|
@@ -314,26 +314,26 @@ export declare const createRangeClass: import("../../factory.js").FactoryFunctio
|
|
|
314
314
|
_cacheStep?: number;
|
|
315
315
|
/**
|
|
316
316
|
* Create a clone of the range
|
|
317
|
-
* @return
|
|
317
|
+
* @return clone
|
|
318
318
|
*/
|
|
319
319
|
clone(): /*elided*/ any;
|
|
320
320
|
/**
|
|
321
321
|
* Retrieve the size of the range.
|
|
322
322
|
* Returns an array containing one number, the number of elements in the range.
|
|
323
323
|
* @memberof Range
|
|
324
|
-
* @returns
|
|
324
|
+
* @returns size
|
|
325
325
|
*/
|
|
326
326
|
size(): number[];
|
|
327
327
|
/**
|
|
328
328
|
* Calculate the minimum value in the range
|
|
329
329
|
* @memberof Range
|
|
330
|
-
* @return
|
|
330
|
+
* @return min
|
|
331
331
|
*/
|
|
332
332
|
min(): number | undefined;
|
|
333
333
|
/**
|
|
334
334
|
* Calculate the maximum value in the range
|
|
335
335
|
* @memberof Range
|
|
336
|
-
* @return
|
|
336
|
+
* @return max
|
|
337
337
|
*/
|
|
338
338
|
max(): number | undefined;
|
|
339
339
|
/**
|
|
@@ -351,19 +351,19 @@ export declare const createRangeClass: import("../../factory.js").FactoryFunctio
|
|
|
351
351
|
* @param callback - The callback method is invoked with three
|
|
352
352
|
* parameters: the value of the element, the index
|
|
353
353
|
* of the element, and the Matrix being traversed.
|
|
354
|
-
* @returns
|
|
354
|
+
* @returns array
|
|
355
355
|
*/
|
|
356
356
|
map<T>(callback: RangeMapCallback<T>): T[];
|
|
357
357
|
/**
|
|
358
358
|
* Create an Array with a copy of the Ranges data
|
|
359
359
|
* @memberof Range
|
|
360
|
-
* @returns
|
|
360
|
+
* @returns array
|
|
361
361
|
*/
|
|
362
362
|
toArray(): number[];
|
|
363
363
|
/**
|
|
364
364
|
* Get the primitive value of the Range, a one dimensional array
|
|
365
365
|
* @memberof Range
|
|
366
|
-
* @returns
|
|
366
|
+
* @returns array
|
|
367
367
|
*/
|
|
368
368
|
valueOf(): number[];
|
|
369
369
|
/**
|
|
@@ -374,19 +374,19 @@ export declare const createRangeClass: import("../../factory.js").FactoryFunctio
|
|
|
374
374
|
* lib/utils/number:format for a
|
|
375
375
|
* description of the available
|
|
376
376
|
* options.
|
|
377
|
-
* @returns
|
|
377
|
+
* @returns str
|
|
378
378
|
*/
|
|
379
379
|
format(options?: RangeFormatOptions | number | ((value: number) => string)): string;
|
|
380
380
|
/**
|
|
381
381
|
* Get a string representation of the range.
|
|
382
382
|
* @memberof Range
|
|
383
|
-
* @returns
|
|
383
|
+
* @returns
|
|
384
384
|
*/
|
|
385
385
|
toString(): string;
|
|
386
386
|
/**
|
|
387
387
|
* Get a JSON representation of the range
|
|
388
388
|
* @memberof Range
|
|
389
|
-
* @returns
|
|
389
|
+
* @returns Returns a JSON object structured as:
|
|
390
390
|
* `{"mathjs": "Range", "start": 2, "end": 4, "step": 1}`
|
|
391
391
|
*/
|
|
392
392
|
toJSON(): RangeJSON;
|
|
@@ -437,26 +437,26 @@ export declare const Range: {
|
|
|
437
437
|
_cacheStep?: number;
|
|
438
438
|
/**
|
|
439
439
|
* Create a clone of the range
|
|
440
|
-
* @return
|
|
440
|
+
* @return clone
|
|
441
441
|
*/
|
|
442
442
|
clone(): /*elided*/ any;
|
|
443
443
|
/**
|
|
444
444
|
* Retrieve the size of the range.
|
|
445
445
|
* Returns an array containing one number, the number of elements in the range.
|
|
446
446
|
* @memberof Range
|
|
447
|
-
* @returns
|
|
447
|
+
* @returns size
|
|
448
448
|
*/
|
|
449
449
|
size(): number[];
|
|
450
450
|
/**
|
|
451
451
|
* Calculate the minimum value in the range
|
|
452
452
|
* @memberof Range
|
|
453
|
-
* @return
|
|
453
|
+
* @return min
|
|
454
454
|
*/
|
|
455
455
|
min(): number | undefined;
|
|
456
456
|
/**
|
|
457
457
|
* Calculate the maximum value in the range
|
|
458
458
|
* @memberof Range
|
|
459
|
-
* @return
|
|
459
|
+
* @return max
|
|
460
460
|
*/
|
|
461
461
|
max(): number | undefined;
|
|
462
462
|
/**
|
|
@@ -474,19 +474,19 @@ export declare const Range: {
|
|
|
474
474
|
* @param callback - The callback method is invoked with three
|
|
475
475
|
* parameters: the value of the element, the index
|
|
476
476
|
* of the element, and the Matrix being traversed.
|
|
477
|
-
* @returns
|
|
477
|
+
* @returns array
|
|
478
478
|
*/
|
|
479
479
|
map<T>(callback: RangeMapCallback<T>): T[];
|
|
480
480
|
/**
|
|
481
481
|
* Create an Array with a copy of the Ranges data
|
|
482
482
|
* @memberof Range
|
|
483
|
-
* @returns
|
|
483
|
+
* @returns array
|
|
484
484
|
*/
|
|
485
485
|
toArray(): number[];
|
|
486
486
|
/**
|
|
487
487
|
* Get the primitive value of the Range, a one dimensional array
|
|
488
488
|
* @memberof Range
|
|
489
|
-
* @returns
|
|
489
|
+
* @returns array
|
|
490
490
|
*/
|
|
491
491
|
valueOf(): number[];
|
|
492
492
|
/**
|
|
@@ -497,19 +497,19 @@ export declare const Range: {
|
|
|
497
497
|
* lib/utils/number:format for a
|
|
498
498
|
* description of the available
|
|
499
499
|
* options.
|
|
500
|
-
* @returns
|
|
500
|
+
* @returns str
|
|
501
501
|
*/
|
|
502
502
|
format(options?: RangeFormatOptions | number | ((value: number) => string)): string;
|
|
503
503
|
/**
|
|
504
504
|
* Get a string representation of the range.
|
|
505
505
|
* @memberof Range
|
|
506
|
-
* @returns
|
|
506
|
+
* @returns
|
|
507
507
|
*/
|
|
508
508
|
toString(): string;
|
|
509
509
|
/**
|
|
510
510
|
* Get a JSON representation of the range
|
|
511
511
|
* @memberof Range
|
|
512
|
-
* @returns
|
|
512
|
+
* @returns Returns a JSON object structured as:
|
|
513
513
|
* `{"mathjs": "Range", "start": 2, "end": 4, "step": 1}`
|
|
514
514
|
*/
|
|
515
515
|
toJSON(): RangeJSON;
|
|
@@ -521,7 +521,7 @@ export declare const Range: {
|
|
|
521
521
|
* For example str='0:2:11'.
|
|
522
522
|
* @memberof Range
|
|
523
523
|
* @param str
|
|
524
|
-
* @return
|
|
524
|
+
* @return range
|
|
525
525
|
*/
|
|
526
526
|
parse(str: string): {
|
|
527
527
|
/**
|
|
@@ -562,26 +562,26 @@ export declare const Range: {
|
|
|
562
562
|
_cacheStep?: number;
|
|
563
563
|
/**
|
|
564
564
|
* Create a clone of the range
|
|
565
|
-
* @return
|
|
565
|
+
* @return clone
|
|
566
566
|
*/
|
|
567
567
|
clone(): /*elided*/ any;
|
|
568
568
|
/**
|
|
569
569
|
* Retrieve the size of the range.
|
|
570
570
|
* Returns an array containing one number, the number of elements in the range.
|
|
571
571
|
* @memberof Range
|
|
572
|
-
* @returns
|
|
572
|
+
* @returns size
|
|
573
573
|
*/
|
|
574
574
|
size(): number[];
|
|
575
575
|
/**
|
|
576
576
|
* Calculate the minimum value in the range
|
|
577
577
|
* @memberof Range
|
|
578
|
-
* @return
|
|
578
|
+
* @return min
|
|
579
579
|
*/
|
|
580
580
|
min(): number | undefined;
|
|
581
581
|
/**
|
|
582
582
|
* Calculate the maximum value in the range
|
|
583
583
|
* @memberof Range
|
|
584
|
-
* @return
|
|
584
|
+
* @return max
|
|
585
585
|
*/
|
|
586
586
|
max(): number | undefined;
|
|
587
587
|
/**
|
|
@@ -599,19 +599,19 @@ export declare const Range: {
|
|
|
599
599
|
* @param callback - The callback method is invoked with three
|
|
600
600
|
* parameters: the value of the element, the index
|
|
601
601
|
* of the element, and the Matrix being traversed.
|
|
602
|
-
* @returns
|
|
602
|
+
* @returns array
|
|
603
603
|
*/
|
|
604
604
|
map<T>(callback: RangeMapCallback<T>): T[];
|
|
605
605
|
/**
|
|
606
606
|
* Create an Array with a copy of the Ranges data
|
|
607
607
|
* @memberof Range
|
|
608
|
-
* @returns
|
|
608
|
+
* @returns array
|
|
609
609
|
*/
|
|
610
610
|
toArray(): number[];
|
|
611
611
|
/**
|
|
612
612
|
* Get the primitive value of the Range, a one dimensional array
|
|
613
613
|
* @memberof Range
|
|
614
|
-
* @returns
|
|
614
|
+
* @returns array
|
|
615
615
|
*/
|
|
616
616
|
valueOf(): number[];
|
|
617
617
|
/**
|
|
@@ -622,19 +622,19 @@ export declare const Range: {
|
|
|
622
622
|
* lib/utils/number:format for a
|
|
623
623
|
* description of the available
|
|
624
624
|
* options.
|
|
625
|
-
* @returns
|
|
625
|
+
* @returns str
|
|
626
626
|
*/
|
|
627
627
|
format(options?: RangeFormatOptions | number | ((value: number) => string)): string;
|
|
628
628
|
/**
|
|
629
629
|
* Get a string representation of the range.
|
|
630
630
|
* @memberof Range
|
|
631
|
-
* @returns
|
|
631
|
+
* @returns
|
|
632
632
|
*/
|
|
633
633
|
toString(): string;
|
|
634
634
|
/**
|
|
635
635
|
* Get a JSON representation of the range
|
|
636
636
|
* @memberof Range
|
|
637
|
-
* @returns
|
|
637
|
+
* @returns Returns a JSON object structured as:
|
|
638
638
|
* `{"mathjs": "Range", "start": 2, "end": 4, "step": 1}`
|
|
639
639
|
*/
|
|
640
640
|
toJSON(): RangeJSON;
|
|
@@ -644,7 +644,7 @@ export declare const Range: {
|
|
|
644
644
|
* @memberof Range
|
|
645
645
|
* @param json - A JSON object structured as:
|
|
646
646
|
* `{"mathjs": "Range", "start": 2, "end": 4, "step": 1}`
|
|
647
|
-
* @return
|
|
647
|
+
* @return
|
|
648
648
|
*/
|
|
649
649
|
fromJSON(json: RangeJSON): {
|
|
650
650
|
/**
|
|
@@ -685,26 +685,26 @@ export declare const Range: {
|
|
|
685
685
|
_cacheStep?: number;
|
|
686
686
|
/**
|
|
687
687
|
* Create a clone of the range
|
|
688
|
-
* @return
|
|
688
|
+
* @return clone
|
|
689
689
|
*/
|
|
690
690
|
clone(): /*elided*/ any;
|
|
691
691
|
/**
|
|
692
692
|
* Retrieve the size of the range.
|
|
693
693
|
* Returns an array containing one number, the number of elements in the range.
|
|
694
694
|
* @memberof Range
|
|
695
|
-
* @returns
|
|
695
|
+
* @returns size
|
|
696
696
|
*/
|
|
697
697
|
size(): number[];
|
|
698
698
|
/**
|
|
699
699
|
* Calculate the minimum value in the range
|
|
700
700
|
* @memberof Range
|
|
701
|
-
* @return
|
|
701
|
+
* @return min
|
|
702
702
|
*/
|
|
703
703
|
min(): number | undefined;
|
|
704
704
|
/**
|
|
705
705
|
* Calculate the maximum value in the range
|
|
706
706
|
* @memberof Range
|
|
707
|
-
* @return
|
|
707
|
+
* @return max
|
|
708
708
|
*/
|
|
709
709
|
max(): number | undefined;
|
|
710
710
|
/**
|
|
@@ -722,19 +722,19 @@ export declare const Range: {
|
|
|
722
722
|
* @param callback - The callback method is invoked with three
|
|
723
723
|
* parameters: the value of the element, the index
|
|
724
724
|
* of the element, and the Matrix being traversed.
|
|
725
|
-
* @returns
|
|
725
|
+
* @returns array
|
|
726
726
|
*/
|
|
727
727
|
map<T>(callback: RangeMapCallback<T>): T[];
|
|
728
728
|
/**
|
|
729
729
|
* Create an Array with a copy of the Ranges data
|
|
730
730
|
* @memberof Range
|
|
731
|
-
* @returns
|
|
731
|
+
* @returns array
|
|
732
732
|
*/
|
|
733
733
|
toArray(): number[];
|
|
734
734
|
/**
|
|
735
735
|
* Get the primitive value of the Range, a one dimensional array
|
|
736
736
|
* @memberof Range
|
|
737
|
-
* @returns
|
|
737
|
+
* @returns array
|
|
738
738
|
*/
|
|
739
739
|
valueOf(): number[];
|
|
740
740
|
/**
|
|
@@ -745,19 +745,19 @@ export declare const Range: {
|
|
|
745
745
|
* lib/utils/number:format for a
|
|
746
746
|
* description of the available
|
|
747
747
|
* options.
|
|
748
|
-
* @returns
|
|
748
|
+
* @returns str
|
|
749
749
|
*/
|
|
750
750
|
format(options?: RangeFormatOptions | number | ((value: number) => string)): string;
|
|
751
751
|
/**
|
|
752
752
|
* Get a string representation of the range.
|
|
753
753
|
* @memberof Range
|
|
754
|
-
* @returns
|
|
754
|
+
* @returns
|
|
755
755
|
*/
|
|
756
756
|
toString(): string;
|
|
757
757
|
/**
|
|
758
758
|
* Get a JSON representation of the range
|
|
759
759
|
* @memberof Range
|
|
760
|
-
* @returns
|
|
760
|
+
* @returns Returns a JSON object structured as:
|
|
761
761
|
* `{"mathjs": "Range", "start": 2, "end": 4, "step": 1}`
|
|
762
762
|
*/
|
|
763
763
|
toJSON(): RangeJSON;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@danielsimonjr/mathts-core",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.3",
|
|
4
4
|
"description": "Core types, utilities, and configuration for MathTS",
|
|
5
5
|
"author": "Daniel Simon Jr.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"build:prod": "tsup --minify --treeshake"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"typed-function": "
|
|
38
|
+
"typed-function": "npm:@danielsimonjr/typed-function@5.0.0-alpha.4"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@types/node": "^26.4.0",
|