@m4l/core 0.1.44 → 0.1.45

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/index.js CHANGED
@@ -22,7 +22,7 @@ import { u as so } from "./hooks/useNetwork/index.acbf28d5.js";
22
22
  import { i as no, u as mo } from "./hooks/usePaginate/index.9ed61e68.js";
23
23
  import { u as xo } from "./hooks/usePropageteMF/index.c440b829.js";
24
24
  import { C as lo, E as fo } from "./types/index.42c24946.js";
25
- import { e as go, a as Po, g as Co, s as Mo, v as Do } from "./utils/index.6d56ba04.js";
25
+ import { e as go, a as Po, g as Co, s as Mo, v as Do } from "./utils/index.78881d49.js";
26
26
  import { a as co } from "./utils/axiosOperation.d83903ee.js";
27
27
  import "react/jsx-runtime";
28
28
  import "axios";
package/package.json CHANGED
@@ -1,9 +1,8 @@
1
1
  {
2
2
  "name": "@m4l/core",
3
- "version": "0.1.44",
3
+ "version": "0.1.45",
4
4
  "license": "UNLICENSED",
5
5
  "author": "M4L Team",
6
- "private": false,
7
6
  "peerDependencies": {
8
7
  "@types/nprogress": "^0.2.0",
9
8
  "@types/qs": "^6.9.7",
@@ -32,5 +31,6 @@
32
31
  "dependencies": {
33
32
  "camelcase-keys": "^7.0.1",
34
33
  "snakecase-keys": "5.1.2"
35
- }
34
+ },
35
+ "private": false
36
36
  }
@@ -0,0 +1,45 @@
1
+ import "axios";
2
+ import "qs";
3
+ import "camelcase-keys";
4
+ import "snakecase-keys";
5
+ function l() {
6
+ }
7
+ function u(r, t) {
8
+ return t.split(".").reduce((e, o) => (e || {})[o], r);
9
+ }
10
+ function g(r, t) {
11
+ try {
12
+ const o = new Function(...Object.keys(r), `return \`${t}\``)(...Object.values(r));
13
+ return String(o).replace(/`/g, "");
14
+ } catch (e) {
15
+ return console.error(`Error evaluating expression: ${e}`), "";
16
+ }
17
+ }
18
+ function p(r, t) {
19
+ try {
20
+ const e = window.localStorage.getItem(r);
21
+ return e !== null ? typeof t == "string" ? e : JSON.parse(e) : t;
22
+ } catch {
23
+ return t;
24
+ }
25
+ }
26
+ function f(r, t, e = !1) {
27
+ try {
28
+ let o = null;
29
+ if (typeof t == "string") {
30
+ window.localStorage.setItem(r, t);
31
+ return;
32
+ }
33
+ e && (o = window.localStorage.getItem(r));
34
+ let n = o !== null ? JSON.parse(o) : {};
35
+ n = { ...n, ...t }, window.localStorage.setItem(r, JSON.stringify(n));
36
+ } catch {
37
+ }
38
+ }
39
+ export {
40
+ p as a,
41
+ g as e,
42
+ u as g,
43
+ f as s,
44
+ l as v
45
+ };
@@ -1,65 +0,0 @@
1
- import "axios";
2
- import "qs";
3
- import "camelcase-keys";
4
- import "snakecase-keys";
5
- function y() {
6
- }
7
- function p(n, e) {
8
- const r = e.split(".");
9
- let t = n;
10
- for (const o of r) {
11
- const a = o.match(/^(\w+)\[(\w+)\]$/);
12
- if (a) {
13
- const s = a[1], c = a[2];
14
- if (t[s] && Array.isArray(t[s])) {
15
- if (c === "lastIndex")
16
- return t[s][t[s].length - 1];
17
- {
18
- const i = parseInt(c);
19
- return t[s][i];
20
- }
21
- } else
22
- return;
23
- } else if (t[o] !== void 0)
24
- t = t[o];
25
- else
26
- return;
27
- }
28
- return t;
29
- }
30
- function d(n, e) {
31
- try {
32
- const t = new Function(...Object.keys(n), `return \`${e}\``)(...Object.values(n));
33
- return String(t).replace(/`/g, "");
34
- } catch (r) {
35
- return console.error(`Error evaluating expression: ${r}`), "";
36
- }
37
- }
38
- function m(n, e) {
39
- try {
40
- const r = window.localStorage.getItem(n);
41
- return r !== null ? typeof e == "string" ? r : JSON.parse(r) : e;
42
- } catch {
43
- return e;
44
- }
45
- }
46
- function v(n, e, r = !1) {
47
- try {
48
- let t = null;
49
- if (typeof e == "string") {
50
- window.localStorage.setItem(n, e);
51
- return;
52
- }
53
- r && (t = window.localStorage.getItem(n));
54
- let o = t !== null ? JSON.parse(t) : {};
55
- o = { ...o, ...e }, window.localStorage.setItem(n, JSON.stringify(o));
56
- } catch {
57
- }
58
- }
59
- export {
60
- m as a,
61
- d as e,
62
- p as g,
63
- v as s,
64
- y as v
65
- };