melonykit 1.8.2 → 1.9.1
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/browser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as getClientSetting, i as routeTo, t as setClientSetting, r as useQuery } from "./browser-
|
|
1
|
+
export { n as getClientSetting, i as routeTo, t as setClientSetting, r as useQuery } from "./browser-BhVmije8.js";
|
|
@@ -241,47 +241,51 @@ var v = (e) => {
|
|
|
241
241
|
let c = /* @__PURE__ */ new Date();
|
|
242
242
|
return c.setDate(c[r + "Date"]() + 1), o[r + "FullYear"]() === e && o[r + "Month"]() === t && o[r + "Date"]() === n ? a ? "Tdy" : "Today" : s[r + "FullYear"]() === e && s[r + "Month"]() === t && s[r + "Date"]() === n ? a ? "Ysd" : "Yesterday" : c[r + "FullYear"]() === e && c[r + "Month"]() === t && c[r + "Date"]() === n ? a ? "Tmw" : "Tomorrow" : i;
|
|
243
243
|
};
|
|
244
|
-
// src/functions/checks/_is-
|
|
244
|
+
// src/functions/checks/_is-boolean.js
|
|
245
245
|
function S(e) {
|
|
246
|
+
return typeof e == "boolean";
|
|
247
|
+
}
|
|
248
|
+
// src/functions/checks/_is-nil.js
|
|
249
|
+
function C(e) {
|
|
246
250
|
return e == null;
|
|
247
251
|
}
|
|
248
252
|
// src/functions/checks/_is-object.js
|
|
249
|
-
function
|
|
250
|
-
return !
|
|
253
|
+
function w(e) {
|
|
254
|
+
return !C(e) && typeof e == "object" && !a(e);
|
|
251
255
|
}
|
|
252
256
|
// src/functions/checks/_is-empty-object.js
|
|
253
|
-
function
|
|
254
|
-
return
|
|
257
|
+
function T(e) {
|
|
258
|
+
return w(e) && Reflect.ownKeys(e).every((t) => !Object.prototype.propertyIsEnumerable.call(e, t));
|
|
255
259
|
}
|
|
256
260
|
// src/functions/checks/_is-empty-string.js
|
|
257
|
-
function
|
|
261
|
+
function E(e) {
|
|
258
262
|
return t(e) && e.trim().length === 0;
|
|
259
263
|
}
|
|
260
264
|
// src/functions/checks/_is-float.js
|
|
261
|
-
function
|
|
265
|
+
function D(e) {
|
|
262
266
|
return c(e) && !Number.isInteger(e);
|
|
263
267
|
}
|
|
264
268
|
// src/functions/checks/_is-integer.js
|
|
265
|
-
function
|
|
269
|
+
function O(e) {
|
|
266
270
|
return Number.isInteger(e);
|
|
267
271
|
}
|
|
268
272
|
// src/functions/_kebab-case-to-camel-case.js
|
|
269
|
-
function
|
|
273
|
+
function k(e) {
|
|
270
274
|
return t(e) ? e.split("-").filter(Boolean).map((e, t) => t === 0 ? e.toLowerCase() : e.charAt(0).toUpperCase() + e.slice(1).toLowerCase()).join("") : "";
|
|
271
275
|
}
|
|
272
276
|
// src/functions/_kebab-case-to-title-case.js
|
|
273
|
-
function
|
|
277
|
+
function A(e) {
|
|
274
278
|
return t(e) ? e.split("-").filter(Boolean).map((e) => e.charAt(0).toUpperCase() + e.slice(1).toLowerCase()).join(" ") : "";
|
|
275
279
|
}
|
|
276
280
|
// src/functions/_median.js
|
|
277
|
-
function
|
|
281
|
+
function j(e) {
|
|
278
282
|
if (!Array.isArray(e) || e.length === 0) return null;
|
|
279
283
|
for (let t of e) if (!Number.isFinite(t)) return null;
|
|
280
284
|
let t = [...e].sort((e, t) => e - t), n = Math.floor(t.length / 2);
|
|
281
285
|
return t.length % 2 == 0 ? (t[n - 1] + t[n]) / 2 : t[n];
|
|
282
286
|
}
|
|
283
287
|
// src/functions/_request.js
|
|
284
|
-
async function
|
|
288
|
+
async function M({ url: e, body: t, method: n = "POST", headers: r = {} } = {}) {
|
|
285
289
|
let i = n !== "GET" && t !== void 0 ? JSON.stringify(t) : void 0, a = await fetch(e, {
|
|
286
290
|
method: n,
|
|
287
291
|
headers: {
|
|
@@ -301,26 +305,26 @@ async function j({ url: e, body: t, method: n = "POST", headers: r = {} } = {})
|
|
|
301
305
|
return a.ok || (s.error = s.data ?? /* @__PURE__ */ Error(`Request failed with status ${a.status}.`)), s;
|
|
302
306
|
}
|
|
303
307
|
// src/functions/_risk-reward.js
|
|
304
|
-
function
|
|
308
|
+
function N(e = {}) {
|
|
305
309
|
let { entry: t, exit: n, riskRatio: r = 20 } = e ?? {};
|
|
306
310
|
if (!c(t) || t <= 0 || !c(n) || n <= 0 || !c(r) || r <= 0) return null;
|
|
307
311
|
let i = (n - t) / t / (r / 100);
|
|
308
312
|
return Math.round(i * 10) / 10;
|
|
309
313
|
}
|
|
310
314
|
// src/functions/_size.js
|
|
311
|
-
function
|
|
315
|
+
function P(e) {
|
|
312
316
|
return e == null ? 0 : Array.isArray(e) || typeof e == "string" ? e.length : typeof e == "object" || typeof e == "function" ? Object.keys(e).length : 0;
|
|
313
317
|
}
|
|
314
318
|
// src/functions/_slugify.js
|
|
315
|
-
function
|
|
319
|
+
function F(e) {
|
|
316
320
|
return typeof e == "string" ? e.trim().toLowerCase().replace(/ä/g, "ae").replace(/ö/g, "oe").replace(/ü/g, "ue").replace(/ß/g, "ss").replace(/æ/g, "ae").replace(/œ/g, "oe").replace(/ø/g, "o").normalize("NFD").replace(/\p{Diacritic}/gu, "").replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") : "";
|
|
317
321
|
}
|
|
318
322
|
// src/functions/_to-number.js
|
|
319
|
-
function
|
|
323
|
+
function I(e, t = null) {
|
|
320
324
|
let n = typeof e == "number" ? e : typeof e == "string" && e.trim() !== "" ? Number(e) : NaN;
|
|
321
325
|
if (!Number.isFinite(n)) return null;
|
|
322
326
|
if (t == null) return n;
|
|
323
327
|
let r = 10 ** t;
|
|
324
328
|
return Math.round(n * r) / r;
|
|
325
329
|
}
|
|
326
|
-
export {
|
|
330
|
+
export { i as C, e as E, a as S, t as T, u as _, M as a, s as b, k as c, E as d, T as f, _ as g, S as h, N as i, O as l, C as m, F as n, j as o, w as p, P as r, A as s, I as t, D as u, l as v, n as w, o as x, c as y };
|
package/dist/functions.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { E as average, w as camelCaseToTitleCase, C as convertHexToRgba, v as createCache, _ as darkenHexColor, g as formatDate, S as isArray, h as isBoolean, x as isEmptyArray, f as isEmptyObject, d as isEmptyString, u as isFloat, b as isFunction, l as isInteger, m as isNil, y as isNumber, p as isObject, T as isString, c as kebabCaseToCamelCase, s as kebabCaseToTitleCase, o as median, a as request, i as riskReward, r as size, n as slugify, t as toNumber } from "./functions-mQlYMSp2.js";
|