webpb 0.0.23 → 0.0.24
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/index.cjs +1 -1
- package/dist/index.mjs +7 -7
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function s(e,t,o=[]){if(!(!e||!t||typeof e!="object"||typeof t!="object"))for(const[r,n]of Object.entries(e))n!==void 0&&o.indexOf(r)<0&&(t[r]=n)}function l(e,t){if(e==null||typeof e!="object")return null;for(const o of t.split("."))if(e=e[o],e==null)return null;return e}function y(e,t){const o=[];for(const[r,n]of Object.entries(t)){if(n==null||typeof n=="function")continue;let i;Array.isArray(n)?i=n.join(","):typeof n=="object"?i=Object.entries(n).map(([
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function s(e,t,o=[]){if(!(!e||!t||typeof e!="object"||typeof t!="object"))for(const[r,n]of Object.entries(e))n!==void 0&&o.indexOf(r)<0&&(t[r]=n)}function l(e,t){if(e==null||typeof e!="object")return null;for(const o of t.split("."))if(e=e[o],e==null)return null;return e}function y(e,t){const o=[];for(const[r,n]of Object.entries(t)){if(n==null||typeof n=="function")continue;let i;Array.isArray(n)?i=n.join(","):typeof n=="object"?i=Object.entries(n).filter(([f])=>f!=="").map(([f,c])=>`${f},${c}`).join(";"):i=String(n);const u=encodeURIComponent(i);u&&o.push(`${r}=${u}`)}return o.length?`${e}${o.join("&")}`:""}function j(e,t){if(!e||typeof e!="object"||Array.isArray(e))return e;const o={};for(const[r,n]of Object.entries(e)){const i=n==null?void 0:n.toAlias;typeof i=="function"?o[r]=i():t&&t[r]?o[t[r]]=n:o[r]=n}return o}function p(e,t){return Object.entries(e).reduce((o,[r,n])=>(o[r]=t(n),o),{})}exports.assign=s;exports.getter=l;exports.mapValues=p;exports.query=y;exports.toAlias=j;
|
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
function
|
|
1
|
+
function l(e, t, o = []) {
|
|
2
2
|
if (!(!e || !t || typeof e != "object" || typeof t != "object"))
|
|
3
3
|
for (const [r, n] of Object.entries(e))
|
|
4
4
|
n !== void 0 && o.indexOf(r) < 0 && (t[r] = n);
|
|
5
5
|
}
|
|
6
|
-
function
|
|
6
|
+
function s(e, t) {
|
|
7
7
|
if (e == null || typeof e != "object")
|
|
8
8
|
return null;
|
|
9
9
|
for (const o of t.split("."))
|
|
@@ -17,9 +17,9 @@ function y(e, t) {
|
|
|
17
17
|
if (n == null || typeof n == "function")
|
|
18
18
|
continue;
|
|
19
19
|
let i;
|
|
20
|
-
Array.isArray(n) ? i = n.join(",") : typeof n == "object" ? i = Object.entries(n).map(([
|
|
21
|
-
const
|
|
22
|
-
|
|
20
|
+
Array.isArray(n) ? i = n.join(",") : typeof n == "object" ? i = Object.entries(n).filter(([f]) => f !== "").map(([f, c]) => `${f},${c}`).join(";") : i = String(n);
|
|
21
|
+
const u = encodeURIComponent(i);
|
|
22
|
+
u && o.push(`${r}=${u}`);
|
|
23
23
|
}
|
|
24
24
|
return o.length ? `${e}${o.join("&")}` : "";
|
|
25
25
|
}
|
|
@@ -37,8 +37,8 @@ function p(e, t) {
|
|
|
37
37
|
return Object.entries(e).reduce((o, [r, n]) => (o[r] = t(n), o), {});
|
|
38
38
|
}
|
|
39
39
|
export {
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
l as assign,
|
|
41
|
+
s as getter,
|
|
42
42
|
p as mapValues,
|
|
43
43
|
y as query,
|
|
44
44
|
j as toAlias
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "webpb",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.24",
|
|
4
4
|
"description": "The webpb runtime library",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "rimraf build/**/* && tsc && vite build && dts-bundle-generator --config ./dts-bundle-generator.config.ts && copyfiles ./README.md ./package.json build",
|