@spscommerce/utils 5.10.2 → 5.10.5-ie
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/package.json +5 -5
- package/rollup.config.js +22 -0
- package/vite.config.js +1 -1
- package/lib/array/flatten.d.ts +0 -1
- package/lib/array/flatten.spec.d.ts +0 -1
- package/lib/array/index.d.ts +0 -3
- package/lib/array/is-subset.d.ts +0 -4
- package/lib/array/is-subset.spec.d.ts +0 -1
- package/lib/array/range.d.ts +0 -5
- package/lib/array/range.spec.d.ts +0 -1
- package/lib/classes/custom-event.d.ts +0 -4
- package/lib/classes/index.d.ts +0 -1
- package/lib/data/doctypes.d.ts +0 -4
- package/lib/data/index.d.ts +0 -1
- package/lib/decorators/cast-to-number.d.ts +0 -5
- package/lib/decorators/debounced.broken_spec.d.ts +0 -0
- package/lib/decorators/debounced.d.ts +0 -11
- package/lib/decorators/index.d.ts +0 -5
- package/lib/decorators/locked-to-animation-frames.d.ts +0 -4
- package/lib/decorators/locked-to-animation-frames.spec.d.ts +0 -0
- package/lib/decorators/simple-metadata-decorator-applicator.d.ts +0 -11
- package/lib/decorators/tick-delay.d.ts +0 -6
- package/lib/function/debounce.d.ts +0 -9
- package/lib/function/debounce.spec.d.ts +0 -1
- package/lib/function/debounced-function.interface.d.ts +0 -10
- package/lib/function/delayed-function.interface.d.ts +0 -10
- package/lib/function/index.d.ts +0 -6
- package/lib/function/lock-to-animation-frames.d.ts +0 -7
- package/lib/function/lock-to-animation-frames.spec.d.ts +0 -0
- package/lib/function/on-next-tick.d.ts +0 -8
- package/lib/function/on-next-tick.spec.d.ts +0 -1
- package/lib/function/op.d.ts +0 -32
- package/lib/function/op.spec.d.ts +0 -1
- package/lib/index.cjs.js +0 -1
- package/lib/index.d.ts +0 -9
- package/lib/index.es.js +0 -1024
- package/lib/number/constrain.d.ts +0 -7
- package/lib/number/decimal-round.d.ts +0 -7
- package/lib/number/decimal-round.spec.d.ts +0 -1
- package/lib/number/index.d.ts +0 -3
- package/lib/number/to-file-size-string.d.ts +0 -5
- package/lib/object/copy-property.d.ts +0 -6
- package/lib/object/copy-property.spec.d.ts +0 -1
- package/lib/object/crumble-path.d.ts +0 -6
- package/lib/object/crumble-path.spec.d.ts +0 -1
- package/lib/object/deep-freeze.d.ts +0 -1
- package/lib/object/deep-freeze.spec.d.ts +0 -1
- package/lib/object/diff.d.ts +0 -12
- package/lib/object/diff.spec.d.ts +0 -1
- package/lib/object/for-each-entry-deep.d.ts +0 -4
- package/lib/object/for-each-entry-deep.spec.d.ts +0 -1
- package/lib/object/for-each-nested-object.d.ts +0 -4
- package/lib/object/for-each-nested-object.spec.d.ts +0 -1
- package/lib/object/get-path.d.ts +0 -5
- package/lib/object/get-path.spec.d.ts +0 -1
- package/lib/object/index.d.ts +0 -13
- package/lib/object/merge-deep.d.ts +0 -4
- package/lib/object/merge-deep.spec.d.ts +0 -1
- package/lib/object/merge-properties-deep.d.ts +0 -4
- package/lib/object/merge-properties-deep.spec.d.ts +0 -1
- package/lib/object/omit.d.ts +0 -1
- package/lib/object/omit.spec.d.ts +0 -1
- package/lib/object/set-path.d.ts +0 -2
- package/lib/object/set-path.spec.d.ts +0 -1
- package/lib/object/traverse-path.d.ts +0 -2
- package/lib/object/values.d.ts +0 -2
- package/lib/object/values.spec.d.ts +0 -1
- package/lib/string/code.template-tag.d.ts +0 -2
- package/lib/string/index.d.ts +0 -3
- package/lib/string/parse-file-size.d.ts +0 -5
- package/lib/string/template.d.ts +0 -15
- package/lib/string/template.spec.d.ts +0 -1
- package/lib/typings.d.ts +0 -1
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Constrains a number to the given range. If the number is below the
|
|
3
|
-
* low end of the range, the low end will be returned. If the number is
|
|
4
|
-
* above the top end of the range, the top end will be returned. Otherwise
|
|
5
|
-
* the number itself will be returned.
|
|
6
|
-
*/
|
|
7
|
-
export declare function constrain(n: number, range: [number, number]): number;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Progressively rounds `num` to `decimalPlaces` places. This differs from other
|
|
3
|
-
* rounding methods out there such as lodash's, which are not progressive. For example,
|
|
4
|
-
* `(0.149).toFixed(1)` and lodash `_.round(0.149, 1)` both return `0.1`, but this
|
|
5
|
-
* function rounds `0.149` to `0.15` and then `0.15` to `0.2` and returns `0.2`.
|
|
6
|
-
*/
|
|
7
|
-
export declare function decimalRound(num: number, decimalPlaces?: number): number;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/lib/number/index.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copy a property from one object to another using its property descriptor.
|
|
3
|
-
* In other words, if it's a getter/setter on `sourceObject` it'll be the same
|
|
4
|
-
* getter/setter on `destObject`. If it's just a value it'll be just a value.
|
|
5
|
-
*/
|
|
6
|
-
export declare function copyProperty(propName: PropertyKey, sourceObject: any, destObject: any): void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function deepFreeze(obj: any): void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/lib/object/diff.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare enum DiffChange {
|
|
2
|
-
ADDITION = 0,
|
|
3
|
-
DELETION = 1,
|
|
4
|
-
ALTERATION = 2
|
|
5
|
-
}
|
|
6
|
-
export interface DiffEntry {
|
|
7
|
-
type: DiffChange;
|
|
8
|
-
key: PropertyKey;
|
|
9
|
-
parentPath: PropertyKey[];
|
|
10
|
-
objects: [Record<PropertyKey, unknown>, Record<PropertyKey, unknown>];
|
|
11
|
-
}
|
|
12
|
-
export declare function diff(o1: Record<PropertyKey, unknown>, o2: Record<PropertyKey, unknown>, parentPath?: PropertyKey[]): DiffEntry[];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/lib/object/get-path.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/lib/object/index.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export * from "./crumble-path";
|
|
2
|
-
export * from "./copy-property";
|
|
3
|
-
export * from "./deep-freeze";
|
|
4
|
-
export * from "./diff";
|
|
5
|
-
export * from "./for-each-entry-deep";
|
|
6
|
-
export * from "./for-each-nested-object";
|
|
7
|
-
export * from "./get-path";
|
|
8
|
-
export * from "./omit";
|
|
9
|
-
export * from "./set-path";
|
|
10
|
-
export * from "./traverse-path";
|
|
11
|
-
export * from "./merge-deep";
|
|
12
|
-
export * from "./merge-properties-deep";
|
|
13
|
-
export * from "./values";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/lib/object/omit.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function omit(obj: any, ...keys: PropertyKey[]): {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/lib/object/set-path.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/lib/object/values.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/lib/string/index.d.ts
DELETED
package/lib/string/template.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
declare type TemplateFn = (data: any) => string;
|
|
2
|
-
/**
|
|
3
|
-
* Every string templating thing out there whether lodash, doT, handlebars, etc
|
|
4
|
-
* is extremely complicated to cover a variety of use cases. This just has two
|
|
5
|
-
* very simple features and great caution should be exercised in making it any more
|
|
6
|
-
* complex than that. A value can be interpolated like so:
|
|
7
|
-
* `<%= foo.bar %>`
|
|
8
|
-
* And a basic "if" conditional can be used like so:
|
|
9
|
-
* `<%? a?.b?.c %>This part will only appear if a.b.c is truthy!</%>`
|
|
10
|
-
* You can put interpolations inside a conditional, as you'd expect. That's it.
|
|
11
|
-
*/
|
|
12
|
-
export declare function template(string: string): TemplateFn;
|
|
13
|
-
export declare function isTemplate(x: any): x is string;
|
|
14
|
-
export declare function isTemplateFn(x: any): x is TemplateFn;
|
|
15
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/lib/typings.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare type Eventually<T> = T | Promise<T>;
|