melonykit 1.6.0 → 1.7.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/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-CaBX4YcI.js";
|
|
@@ -283,13 +283,18 @@ function D(e) {
|
|
|
283
283
|
return Number.isInteger(e);
|
|
284
284
|
}
|
|
285
285
|
//#endregion
|
|
286
|
-
//#region src/functions/_kebab-case-to-
|
|
286
|
+
//#region src/functions/_kebab-case-to-camel-case.js
|
|
287
287
|
function O(e) {
|
|
288
|
+
return t(e) ? e.split("-").filter(Boolean).map((e, t) => t === 0 ? e.toLowerCase() : e.charAt(0).toUpperCase() + e.slice(1).toLowerCase()).join("") : "";
|
|
289
|
+
}
|
|
290
|
+
//#endregion
|
|
291
|
+
//#region src/functions/_kebab-case-to-title-case.js
|
|
292
|
+
function k(e) {
|
|
288
293
|
return t(e) ? e.split("-").filter(Boolean).map((e) => e.charAt(0).toUpperCase() + e.slice(1).toLowerCase()).join(" ") : "";
|
|
289
294
|
}
|
|
290
295
|
//#endregion
|
|
291
296
|
//#region src/functions/_median.js
|
|
292
|
-
function
|
|
297
|
+
function A(e) {
|
|
293
298
|
if (!Array.isArray(e) || e.length === 0) return null;
|
|
294
299
|
for (let t of e) if (!Number.isFinite(t)) return null;
|
|
295
300
|
let t = [...e].sort((e, t) => e - t), n = Math.floor(t.length / 2);
|
|
@@ -297,7 +302,7 @@ function k(e) {
|
|
|
297
302
|
}
|
|
298
303
|
//#endregion
|
|
299
304
|
//#region src/functions/_request.js
|
|
300
|
-
async function
|
|
305
|
+
async function j({ url: e, body: t, method: n = "POST", headers: r = {} } = {}) {
|
|
301
306
|
let i = n !== "GET" && t !== void 0 ? JSON.stringify(t) : void 0, a = await fetch(e, {
|
|
302
307
|
method: n,
|
|
303
308
|
headers: {
|
|
@@ -318,7 +323,7 @@ async function A({ url: e, body: t, method: n = "POST", headers: r = {} } = {})
|
|
|
318
323
|
}
|
|
319
324
|
//#endregion
|
|
320
325
|
//#region src/functions/_risk-reward.js
|
|
321
|
-
function
|
|
326
|
+
function M(e = {}) {
|
|
322
327
|
let { entry: t, exit: n, riskRatio: r = 20 } = e ?? {};
|
|
323
328
|
if (!c(t) || t <= 0 || !c(n) || n <= 0 || !c(r) || r <= 0) return null;
|
|
324
329
|
let i = (n - t) / t / (r / 100);
|
|
@@ -326,17 +331,17 @@ function j(e = {}) {
|
|
|
326
331
|
}
|
|
327
332
|
//#endregion
|
|
328
333
|
//#region src/functions/_size.js
|
|
329
|
-
function
|
|
334
|
+
function N(e) {
|
|
330
335
|
return e == null ? 0 : Array.isArray(e) || typeof e == "string" ? e.length : typeof e == "object" || typeof e == "function" ? Object.keys(e).length : 0;
|
|
331
336
|
}
|
|
332
337
|
//#endregion
|
|
333
338
|
//#region src/functions/_slugify.js
|
|
334
|
-
function
|
|
339
|
+
function P(e) {
|
|
335
340
|
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, "") : "";
|
|
336
341
|
}
|
|
337
342
|
//#endregion
|
|
338
343
|
//#region src/functions/_to-number.js
|
|
339
|
-
function
|
|
344
|
+
function F(e, t = null) {
|
|
340
345
|
let n = typeof e == "number" ? e : typeof e == "string" && e.trim() !== "" ? Number(e) : NaN;
|
|
341
346
|
if (!Number.isFinite(n)) return null;
|
|
342
347
|
if (t == null) return n;
|
|
@@ -344,4 +349,4 @@ function P(e, t = null) {
|
|
|
344
349
|
return Math.round(n * r) / r;
|
|
345
350
|
}
|
|
346
351
|
//#endregion
|
|
347
|
-
export {
|
|
352
|
+
export { n as C, i as S, e as T, l as _, j as a, o as b, O as c, T as d, w as f, u as g, _ as h, M as i, D as l, S as m, P as n, A as o, C as p, N as r, k as s, F as t, E as u, c as v, t as w, a as x, s as y };
|
package/dist/functions.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { T as average, C as camelCaseToTitleCase, S as convertHexToRgba, _ as createCache, g as darkenHexColor, h as formatDate, x as isArray, b as isEmptyArray, f as isEmptyObject, d as isEmptyString, u as isFloat, y as isFunction, l as isInteger, m as isNil, v as isNumber, p as isObject, w 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-C0XYAMNN.js";
|