@mirai/core 0.4.57 → 0.4.58

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.
@@ -16,4 +16,13 @@ if (!Object.fromEntries) {
16
16
  return obj;
17
17
  };
18
18
  }
19
+ if (!Array.prototype.flat) {
20
+ Array.prototype.flat = function () {
21
+ let depth = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
22
+ const flatten = (arr, depth) => {
23
+ return depth > 0 ? arr.reduce((acc, val) => acc.concat(Array.isArray(val) ? flatten(val, depth - 1) : val), []) : arr.slice();
24
+ };
25
+ return flatten(this, depth);
26
+ };
27
+ }
19
28
  //# sourceMappingURL=polyfills.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"polyfills.js","names":["Object","fromEntries","iterable","TypeError","obj","pair","key","value"],"sources":["../../src/helpers/polyfills.js"],"sourcesContent":["if (!Object.fromEntries) {\n Object.fromEntries = function (iterable) {\n if (iterable == null) {\n throw new TypeError('Object.fromEntries() requires a single iterable argument');\n }\n const obj = {};\n for (const pair of iterable) {\n if (Object(pair) !== pair) {\n throw new TypeError('Iterator value ' + pair + ' is not an entry object');\n }\n const [key, value] = pair;\n obj[key] = value;\n }\n return obj;\n };\n}\n"],"mappings":";;AAAA,IAAI,CAACA,MAAM,CAACC,WAAW,EAAE;EACvBD,MAAM,CAACC,WAAW,GAAG,UAAUC,QAAQ,EAAE;IACvC,IAAIA,QAAQ,IAAI,IAAI,EAAE;MACpB,MAAM,IAAIC,SAAS,CAAC,0DAA0D,CAAC;IACjF;IACA,MAAMC,GAAG,GAAG,CAAC,CAAC;IACd,KAAK,MAAMC,IAAI,IAAIH,QAAQ,EAAE;MAC3B,IAAIF,MAAM,CAACK,IAAI,CAAC,KAAKA,IAAI,EAAE;QACzB,MAAM,IAAIF,SAAS,CAAC,iBAAiB,GAAGE,IAAI,GAAG,yBAAyB,CAAC;MAC3E;MACA,MAAM,CAACC,GAAG,EAAEC,KAAK,CAAC,GAAGF,IAAI;MACzBD,GAAG,CAACE,GAAG,CAAC,GAAGC,KAAK;IAClB;IACA,OAAOH,GAAG;EACZ,CAAC;AACH"}
1
+ {"version":3,"file":"polyfills.js","names":["Object","fromEntries","iterable","TypeError","obj","pair","key","value","Array","prototype","flat","depth","arguments","length","undefined","flatten","arr","reduce","acc","val","concat","isArray","slice"],"sources":["../../src/helpers/polyfills.js"],"sourcesContent":["if (!Object.fromEntries) {\n Object.fromEntries = function (iterable) {\n if (iterable == null) {\n throw new TypeError('Object.fromEntries() requires a single iterable argument');\n }\n const obj = {};\n for (const pair of iterable) {\n if (Object(pair) !== pair) {\n throw new TypeError('Iterator value ' + pair + ' is not an entry object');\n }\n const [key, value] = pair;\n obj[key] = value;\n }\n return obj;\n };\n}\n\nif (!Array.prototype.flat) {\n Array.prototype.flat = function (depth = 1) {\n const flatten = (arr, depth) => {\n return depth > 0\n ? arr.reduce((acc, val) => acc.concat(Array.isArray(val) ? flatten(val, depth - 1) : val), [])\n : arr.slice();\n };\n\n return flatten(this, depth);\n };\n}\n"],"mappings":";;AAAA,IAAI,CAACA,MAAM,CAACC,WAAW,EAAE;EACvBD,MAAM,CAACC,WAAW,GAAG,UAAUC,QAAQ,EAAE;IACvC,IAAIA,QAAQ,IAAI,IAAI,EAAE;MACpB,MAAM,IAAIC,SAAS,CAAC,0DAA0D,CAAC;IACjF;IACA,MAAMC,GAAG,GAAG,CAAC,CAAC;IACd,KAAK,MAAMC,IAAI,IAAIH,QAAQ,EAAE;MAC3B,IAAIF,MAAM,CAACK,IAAI,CAAC,KAAKA,IAAI,EAAE;QACzB,MAAM,IAAIF,SAAS,CAAC,iBAAiB,GAAGE,IAAI,GAAG,yBAAyB,CAAC;MAC3E;MACA,MAAM,CAACC,GAAG,EAAEC,KAAK,CAAC,GAAGF,IAAI;MACzBD,GAAG,CAACE,GAAG,CAAC,GAAGC,KAAK;IAClB;IACA,OAAOH,GAAG;EACZ,CAAC;AACH;AAEA,IAAI,CAACI,KAAK,CAACC,SAAS,CAACC,IAAI,EAAE;EACzBF,KAAK,CAACC,SAAS,CAACC,IAAI,GAAG,YAAqB;IAAA,IAAXC,KAAK,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC;IACxC,MAAMG,OAAO,GAAGA,CAACC,GAAG,EAAEL,KAAK,KAAK;MAC9B,OAAOA,KAAK,GAAG,CAAC,GACZK,GAAG,CAACC,MAAM,CAAC,CAACC,GAAG,EAAEC,GAAG,KAAKD,GAAG,CAACE,MAAM,CAACZ,KAAK,CAACa,OAAO,CAACF,GAAG,CAAC,GAAGJ,OAAO,CAACI,GAAG,EAAER,KAAK,GAAG,CAAC,CAAC,GAAGQ,GAAG,CAAC,EAAE,EAAE,CAAC,GAC5FH,GAAG,CAACM,KAAK,CAAC,CAAC;IACjB,CAAC;IAED,OAAOP,OAAO,CAAC,IAAI,EAAEJ,KAAK,CAAC;EAC7B,CAAC;AACH"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mirai/core",
3
- "version": "0.4.57",
3
+ "version": "0.4.58",
4
4
  "source": "src/index.js",
5
5
  "repository": "https://gitlab.com/miraicorp/dev/frontend/core",
6
6
  "author": "JΛVI <hello@soyjavi.com>",