@spscommerce/utils 3.12.4 → 3.16.0
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/lib/array/index.d.ts +3 -3
- package/lib/classes/index.d.ts +1 -1
- package/lib/data/index.d.ts +1 -1
- package/lib/decorators/debounced.d.ts +8 -1
- package/lib/decorators/index.d.ts +5 -5
- package/lib/decorators/locked-to-animation-frames.d.ts +8 -1
- package/lib/decorators/tick-delay.d.ts +5 -1
- package/lib/function/debounce.d.ts +2 -2
- package/lib/function/debounced-function.interface.d.ts +1 -1
- package/lib/function/index.d.ts +6 -6
- package/lib/function/lock-to-animation-frames.d.ts +1 -1
- package/lib/function/on-next-tick.d.ts +1 -1
- package/lib/index.cjs.js +448 -422
- package/lib/index.d.ts +9 -9
- package/lib/index.esm.js +448 -422
- package/lib/number/index.d.ts +3 -3
- package/lib/object/get-path.d.ts +2 -2
- package/lib/object/index.d.ts +13 -13
- package/lib/object/traverse-path.d.ts +1 -1
- package/lib/string/index.d.ts +3 -3
- package/package.json +2 -2
- package/rollup.config.js +24 -0
package/lib/number/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
1
|
+
export * from './constrain';
|
|
2
|
+
export * from './decimal-round';
|
|
3
|
+
export * from './to-file-size-string';
|
package/lib/object/get-path.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
1
|
+
/** Get the value at `path` starting from `object`.
|
|
2
|
+
* Allows optional chaining, e.g. `get(obj, 'a.b?.c')`
|
|
3
3
|
*/
|
|
4
4
|
export declare function getPath<T>(object: any, path: string | PropertyKey | PropertyKey[], defaultValue?: T, allOptional?: boolean): T;
|
package/lib/object/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
12
|
-
export * from
|
|
13
|
-
export * from
|
|
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,2 +1,2 @@
|
|
|
1
1
|
/** Generator for iterating down a path on an object. */
|
|
2
|
-
export declare function traversePath(object: any, path: any):
|
|
2
|
+
export declare function traversePath(object: any, path: any): Generator<any, void, unknown>;
|
package/lib/string/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
1
|
+
export * from './code.template-tag';
|
|
2
|
+
export * from './parse-file-size';
|
|
3
|
+
export * from './template';
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spscommerce/utils",
|
|
3
3
|
"description": "Utility items for frontend projects.",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.16.0",
|
|
5
5
|
"author": "SPS Commerce",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"repository": "https://github.com/spscommerce/design-system/tree/main/packages/@spscommerce/utils",
|
|
8
8
|
"homepage": "https://github.com/spscommerce/design-system/tree/main/packages/@spscommerce/utils#readme",
|
|
9
9
|
"scripts": {
|
|
10
10
|
"build": "yarn run build:rollup",
|
|
11
|
-
"build:rollup": "npx rollup -c rollup.config.
|
|
11
|
+
"build:rollup": "npx rollup -c rollup.config.js",
|
|
12
12
|
"clean": "git clean -fdX",
|
|
13
13
|
"pub": "node ../../../scripts/publish-package.js"
|
|
14
14
|
},
|
package/rollup.config.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import commonjs from "@rollup/plugin-commonjs";
|
|
2
|
+
import resolve from "@rollup/plugin-node-resolve";
|
|
3
|
+
import typescript from "rollup-plugin-typescript2";
|
|
4
|
+
import pkg from "./package.json";
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
input: "src/index.ts",
|
|
8
|
+
output: [
|
|
9
|
+
{
|
|
10
|
+
file: pkg.main,
|
|
11
|
+
format: "cjs",
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
file: pkg.module,
|
|
15
|
+
format: "es",
|
|
16
|
+
},
|
|
17
|
+
],
|
|
18
|
+
external: Object.keys(pkg.peerDependencies || {}),
|
|
19
|
+
plugins: [
|
|
20
|
+
resolve(),
|
|
21
|
+
commonjs(),
|
|
22
|
+
typescript(),
|
|
23
|
+
],
|
|
24
|
+
};
|