@ptx-showcase/utils 0.1.1 → 0.2.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/dist/build-sort-param/index.cjs +1 -0
- package/dist/build-sort-param/index.d.ts +1 -0
- package/dist/build-sort-param/index.js +7 -0
- package/dist/cookies/index.cjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -1
- package/package.json +9 -4
- /package/dist/{cookies-BayERMbH.cjs → chunks/cookies-BayERMbH.cjs} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=(e,t)=>{let n=`-`+e,r=t.split(`,`).filter(Boolean);return r.includes(n)?r.filter(e=>e!==n).join(`,`):r.includes(e)?r.map(t=>t===e?n:t).join(`,`):[e,...r].join(`,`)};exports.buildSortParam=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const buildSortParam: (field: string, prev: string) => string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
//#region src/build-sort-param/index.ts
|
|
2
|
+
var e = (e, t) => {
|
|
3
|
+
let n = "-" + e, r = t.split(",").filter(Boolean);
|
|
4
|
+
return r.includes(n) ? r.filter((e) => e !== n).join(",") : r.includes(e) ? r.map((t) => t === e ? n : t).join(",") : [e, ...r].join(",");
|
|
5
|
+
};
|
|
6
|
+
//#endregion
|
|
7
|
+
export { e as buildSortParam };
|
package/dist/cookies/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../cookies-BayERMbH.cjs");exports.defaultCookieOptions=e.t,exports.deleteCookie=e.n,exports.getCookie=e.r,exports.setCookie=e.i;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../chunks/cookies-BayERMbH.cjs");exports.defaultCookieOptions=e.t,exports.deleteCookie=e.n,exports.getCookie=e.r,exports.setCookie=e.i;
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./cookies-BayERMbH.cjs"),t=require("./build-query-params/index.cjs"),n=require("./clean-object/index.cjs");exports.buildQueryParams=t.buildQueryParams,exports.cleanObject=n.cleanObject,exports.defaultCookieOptions=e.t,exports.deleteCookie=e.n,exports.getCookie=e.r,exports.setCookie=e.i;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./chunks/cookies-BayERMbH.cjs"),t=require("./build-query-params/index.cjs"),n=require("./clean-object/index.cjs"),r=require("./build-sort-param/index.cjs");exports.buildQueryParams=t.buildQueryParams,exports.buildSortParam=r.buildSortParam,exports.cleanObject=n.cleanObject,exports.defaultCookieOptions=e.t,exports.deleteCookie=e.n,exports.getCookie=e.r,exports.setCookie=e.i;
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { buildQueryParams as e } from "./build-query-params/index.js";
|
|
2
2
|
import { cleanObject as t } from "./clean-object/index.js";
|
|
3
3
|
import { defaultCookieOptions as n, deleteCookie as r, getCookie as i, setCookie as a } from "./cookies/index.js";
|
|
4
|
-
|
|
4
|
+
import { buildSortParam as o } from "./build-sort-param/index.js";
|
|
5
|
+
export { e as buildQueryParams, o as buildSortParam, t as cleanObject, n as defaultCookieOptions, r as deleteCookie, i as getCookie, a as setCookie };
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@ptx-showcase/utils",
|
|
3
3
|
"author": "ptx-showcase",
|
|
4
4
|
"description": "Shared utilities for PTX Showcase projects",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.2.0",
|
|
6
6
|
"private": false,
|
|
7
7
|
"type": "module",
|
|
8
8
|
"license": "MIT",
|
|
@@ -41,6 +41,11 @@
|
|
|
41
41
|
"require": "./dist/build-query-params/index.cjs",
|
|
42
42
|
"types": "./dist/build-query-params/index.d.ts"
|
|
43
43
|
},
|
|
44
|
+
"./build-sort-param": {
|
|
45
|
+
"import": "./dist/build-sort-param/index.js",
|
|
46
|
+
"require": "./dist/build-sort-param/index.cjs",
|
|
47
|
+
"types": "./dist/build-sort-param/index.d.ts"
|
|
48
|
+
},
|
|
44
49
|
"./clean-object": {
|
|
45
50
|
"import": "./dist/clean-object/index.js",
|
|
46
51
|
"require": "./dist/clean-object/index.cjs",
|
|
@@ -56,13 +61,14 @@
|
|
|
56
61
|
"dev": "vite",
|
|
57
62
|
"test": "vitest",
|
|
58
63
|
"build": "vite build",
|
|
59
|
-
"
|
|
64
|
+
"release": "bumpp"
|
|
60
65
|
},
|
|
61
66
|
"publishConfig": {
|
|
62
67
|
"access": "public"
|
|
63
68
|
},
|
|
64
69
|
"devDependencies": {
|
|
65
70
|
"@types/node": "^25.9.1",
|
|
71
|
+
"bumpp": "^11.1.0",
|
|
66
72
|
"oxlint": "^1.67.0",
|
|
67
73
|
"typescript": "~6.0.3",
|
|
68
74
|
"vite": "^8.0.14",
|
|
@@ -70,8 +76,7 @@
|
|
|
70
76
|
"vitest": "^4.1.7"
|
|
71
77
|
},
|
|
72
78
|
"dependencies": {
|
|
73
|
-
"js-cookie": "^3.0.7",
|
|
74
79
|
"@types/js-cookie": "^3.0.6",
|
|
75
|
-
"
|
|
80
|
+
"js-cookie": "^3.0.7"
|
|
76
81
|
}
|
|
77
82
|
}
|
|
File without changes
|