@wikicasa-dev/utilities 1.1.5 → 1.1.6

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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./types-CNKgxMk_.cjs");function $(o,f,t,n,e,i,l){let r="/";return t&&(r+=t+"-"),r+=`${f}/`,i&&(r+=`${i}/`),o&&(r+=`${o.replace(/^-+|-+$/g,"")}/`),n&&(r+=`${n.replace(/^_+|_+$/g,"")}/`),!n&&l&&(r+=`${l.replace(/^_+|_+$/g,"")}/`),e&&(r+=`${e.replace(/^_+|_+$/g,"")}/`),r}function u(o,f=!1){const t=f?{...p.ie}:{...p.Oe};return Object.entries(o).filter(([n,e])=>t[n]&&e!=null).flatMap(([n,e])=>Array.isArray(e)?e.map(i=>`${encodeURIComponent(t[n])}=${encodeURIComponent(i)}`):e!=null?`${encodeURIComponent(t[n])}=${e instanceof Date?encodeURIComponent(e.toISOString()):encodeURIComponent(e)}`:[]).join("&")}exports.buildParams=u;exports.buildURL=$;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("./types-CNKgxMk_.cjs");function l(i,p,t,o,r,e,f){let n="/";return t&&(n+=t+"-"),n+=`${p}/`,e&&(n+=`${e}/`),i&&(n+=`${i.replace(/^-+|-+$/g,"")}/`),o&&(n+=`${o.replace(/^_+|_+$/g,"")}/`),!o&&f&&(n+=`${f.replace(/^_+|_+$/g,"")}/`),r&&(n+=`${r.replace(/^_+|_+$/g,"")}/`),n}function a(i,p=!1){const t=p?{...$.ie}:{...$.Oe},o=Object.entries(i).filter(([r,e])=>t[r]&&e!=null).flatMap(([r,e])=>Array.isArray(e)?e.map(f=>`${encodeURIComponent(t[r])}=${encodeURIComponent(f)}`):e!=null?`${encodeURIComponent(t[r])}=${e instanceof Date?encodeURIComponent(e.toISOString()):encodeURIComponent(e)}`:[]).join("&");return o?`?${o}`:""}exports.buildParams=a;exports.buildURL=l;
@@ -1,15 +1,15 @@
1
- import { i as $, O as m } from "./types-CBzIj03u.js";
2
- function l(t, f, o, n, e, i, p) {
3
- let r = "/";
4
- return o && (r += o + "-"), r += `${f}/`, i && (r += `${i}/`), t && (r += `${t.replace(/^-+|-+$/g, "")}/`), n && (r += `${n.replace(/^_+|_+$/g, "")}/`), !n && p && (r += `${p.replace(/^_+|_+$/g, "")}/`), e && (r += `${e.replace(/^_+|_+$/g, "")}/`), r;
1
+ import { i as $, O as a } from "./types-CBzIj03u.js";
2
+ function s(i, p, o, t, r, e, f) {
3
+ let n = "/";
4
+ return o && (n += o + "-"), n += `${p}/`, e && (n += `${e}/`), i && (n += `${i.replace(/^-+|-+$/g, "")}/`), t && (n += `${t.replace(/^_+|_+$/g, "")}/`), !t && f && (n += `${f.replace(/^_+|_+$/g, "")}/`), r && (n += `${r.replace(/^_+|_+$/g, "")}/`), n;
5
5
  }
6
- function c(t, f = !1) {
7
- const o = f ? { ...$ } : { ...m };
8
- return Object.entries(t).filter(([n, e]) => o[n] && e != null).flatMap(([n, e]) => Array.isArray(e) ? e.map(
9
- (i) => `${encodeURIComponent(o[n])}=${encodeURIComponent(i)}`
10
- ) : e != null ? `${encodeURIComponent(o[n])}=${e instanceof Date ? encodeURIComponent(e.toISOString()) : encodeURIComponent(e)}` : []).join("&");
6
+ function c(i, p = !1) {
7
+ const o = p ? { ...$ } : { ...a }, t = Object.entries(i).filter(([r, e]) => o[r] && e != null).flatMap(([r, e]) => Array.isArray(e) ? e.map(
8
+ (f) => `${encodeURIComponent(o[r])}=${encodeURIComponent(f)}`
9
+ ) : e != null ? `${encodeURIComponent(o[r])}=${e instanceof Date ? encodeURIComponent(e.toISOString()) : encodeURIComponent(e)}` : []).join("&");
10
+ return t ? `?${t}` : "";
11
11
  }
12
12
  export {
13
13
  c as buildParams,
14
- l as buildURL
14
+ s as buildURL
15
15
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wikicasa-dev/utilities",
3
- "version": "1.1.5",
3
+ "version": "1.1.6",
4
4
  "description": "Wikicasa frontend utilities",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",