@willbooster/shared-lib 1.3.1 → 1.3.2

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.
@@ -0,0 +1,2 @@
1
+ export { shuffle } from "./shuffle";
2
+ export { zenkakuAlphanumericalsToHankaku } from "./zenkaku";
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./shuffle.js"),u=require("./zenkaku.js");exports.shuffle=e.shuffle,exports.zenkakuAlphanumericalsToHankaku=u.zenkakuAlphanumericalsToHankaku;
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ declare function shuffle<T>(array: T[]): T[];
2
+ export { shuffle };
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.shuffle=function(e){for(let t=e.length-1;t>0;t--){const o=Math.floor(Math.random()*(t+1));[e[t],e[o]]=[e[o],e[t]]}return e};
2
+ //# sourceMappingURL=shuffle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shuffle.js","sources":["../../src/shuffle.ts"],"sourcesContent":["export function shuffle<T>(array: T[]): T[] {\n for (let index = array.length - 1; index > 0; index--) {\n const index_ = Math.floor(Math.random() * (index + 1));\n [array[index], array[index_]] = [array[index_], array[index]];\n }\n return array;\n}\n"],"names":["array","index","length","index_","Math","floor","random"],"mappings":"oFAAO,SAAoBA,GACzB,IAAK,IAAIC,EAAQD,EAAME,OAAS,EAAGD,EAAQ,EAAGA,IAAS,CACrD,MAAME,EAASC,KAAKC,MAAMD,KAAKE,UAAYL,EAAQ,KAClDD,EAAMC,GAAQD,EAAMG,IAAW,CAACH,EAAMG,GAASH,EAAMC,GACxD,CACA,OAAOD,CACT"}
@@ -0,0 +1,2 @@
1
+ declare function zenkakuAlphanumericalsToHankaku(str: string): string;
2
+ export { zenkakuAlphanumericalsToHankaku };
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.zenkakuAlphanumericalsToHankaku=function(e){return e.replace(/[0-9A-Za-z]/g,(e=>{var r;return String.fromCodePoint((null!==(r=e.codePointAt(0))&&void 0!==r?r:0)-65248)}))};
2
+ //# sourceMappingURL=zenkaku.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zenkaku.js","sources":["../../src/zenkaku.ts"],"sourcesContent":["export function zenkakuAlphanumericalsToHankaku(str: string): string {\n return str.replace(/[0-9A-Za-z]/g, (s: string) => {\n return String.fromCodePoint((s.codePointAt(0) ?? 0) - 0xfe_e0);\n });\n}\n"],"names":["str","replace","s","_s$codePointAt","String","fromCodePoint","codePointAt"],"mappings":"4GAAO,SAAyCA,GAC9C,OAAOA,EAAIC,QAAQ,gBAAkBC,IAAc,IAAAC,EACjD,OAAOC,OAAOC,eAA+B,UAAhBH,EAAEI,YAAY,UAAE,IAAAH,EAAAA,EAAI,GAAK,MAAQ,GAElE"}
@@ -0,0 +1,2 @@
1
+ export { shuffle } from "./shuffle";
2
+ export { zenkakuAlphanumericalsToHankaku } from "./zenkaku";
@@ -1 +1,2 @@
1
1
  export{shuffle}from"./shuffle.js";export{zenkakuAlphanumericalsToHankaku}from"./zenkaku.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ declare function shuffle<T>(array: T[]): T[];
2
+ export { shuffle };
@@ -0,0 +1,2 @@
1
+ function t(t){for(let o=t.length-1;o>0;o--){const n=Math.floor(Math.random()*(o+1));[t[o],t[n]]=[t[n],t[o]]}return t}export{t as shuffle};
2
+ //# sourceMappingURL=shuffle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shuffle.js","sources":["../../src/shuffle.ts"],"sourcesContent":["export function shuffle<T>(array: T[]): T[] {\n for (let index = array.length - 1; index > 0; index--) {\n const index_ = Math.floor(Math.random() * (index + 1));\n [array[index], array[index_]] = [array[index_], array[index]];\n }\n return array;\n}\n"],"names":["shuffle","array","index","length","index_","Math","floor","random"],"mappings":"AAAO,SAASA,EAAWC,GACzB,IAAK,IAAIC,EAAQD,EAAME,OAAS,EAAGD,EAAQ,EAAGA,IAAS,CACrD,MAAME,EAASC,KAAKC,MAAMD,KAAKE,UAAYL,EAAQ,KAClDD,EAAMC,GAAQD,EAAMG,IAAW,CAACH,EAAMG,GAASH,EAAMC,GACxD,CACA,OAAOD,CACT"}
@@ -0,0 +1,2 @@
1
+ declare function zenkakuAlphanumericalsToHankaku(str: string): string;
2
+ export { zenkakuAlphanumericalsToHankaku };
@@ -0,0 +1,2 @@
1
+ function r(r){return r.replace(/[0-9A-Za-z]/g,(r=>{var n;return String.fromCodePoint((null!==(n=r.codePointAt(0))&&void 0!==n?n:0)-65248)}))}export{r as zenkakuAlphanumericalsToHankaku};
2
+ //# sourceMappingURL=zenkaku.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zenkaku.js","sources":["../../src/zenkaku.ts"],"sourcesContent":["export function zenkakuAlphanumericalsToHankaku(str: string): string {\n return str.replace(/[0-9A-Za-z]/g, (s: string) => {\n return String.fromCodePoint((s.codePointAt(0) ?? 0) - 0xfe_e0);\n });\n}\n"],"names":["zenkakuAlphanumericalsToHankaku","str","replace","s","_s$codePointAt","String","fromCodePoint","codePointAt"],"mappings":"AAAO,SAASA,EAAgCC,GAC9C,OAAOA,EAAIC,QAAQ,gBAAkBC,IAAc,IAAAC,EACjD,OAAOC,OAAOC,eAA+B,UAAhBH,EAAEI,YAAY,UAAE,IAAAH,EAAAA,EAAI,GAAK,MAAQ,GAElE"}
package/package.json CHANGED
@@ -1,9 +1,11 @@
1
1
  {
2
2
  "name": "@willbooster/shared-lib",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "license": "Apache-2.0",
5
5
  "author": "WillBooster Inc.",
6
- "module": "dist/index.js",
6
+ "main": "dist/cjs/index.js",
7
+ "module": "dist/esm/index.js",
8
+ "types": "dist/esm/index.d.ts",
7
9
  "files": [
8
10
  "bin/",
9
11
  "dist/"
@@ -22,9 +24,9 @@
22
24
  "@babel/core": "7.19.3",
23
25
  "@babel/plugin-proposal-class-properties": "7.18.6",
24
26
  "@babel/plugin-proposal-numeric-separator": "7.18.6",
27
+ "@babel/plugin-transform-runtime": "7.19.1",
25
28
  "@babel/preset-env": "7.19.4",
26
29
  "@babel/preset-typescript": "7.18.6",
27
- "@rollup/plugin-babel": "6.0.0",
28
30
  "@rollup/plugin-commonjs": "22.0.2",
29
31
  "@rollup/plugin-json": "4.1.0",
30
32
  "@rollup/plugin-node-resolve": "14.1.0",
@@ -38,7 +40,7 @@
38
40
  "@willbooster/babel-configs": "1.3.0",
39
41
  "@willbooster/eslint-config-ts": "10.0.7",
40
42
  "@willbooster/prettier-config": "9.1.1",
41
- "@willbooster/rollup-configs": "2.0.0",
43
+ "@willbooster/rollup-configs": "3.0.0",
42
44
  "babel-plugin-transform-remove-console": "6.9.4",
43
45
  "eslint": "8.25.0",
44
46
  "eslint-config-prettier": "8.5.0",
@@ -54,6 +56,7 @@
54
56
  "rollup-plugin-analyzer": "4.0.0",
55
57
  "rollup-plugin-node-externals": "5.0.0",
56
58
  "rollup-plugin-terser": "7.0.2",
59
+ "rollup-plugin-ts": "3.0.2",
57
60
  "sort-package-json": "2.0.0",
58
61
  "typescript": "4.8.4"
59
62
  },
package/dist/shuffle.js DELETED
@@ -1 +0,0 @@
1
- function r(r){for(var o=r.length-1;o>0;o--){var t=Math.floor(Math.random()*(o+1)),a=[r[t],r[o]];r[o]=a[0],r[t]=a[1]}return r}export{r as shuffle};
package/dist/zenkaku.js DELETED
@@ -1 +0,0 @@
1
- function n(n){return n.replace(/[0-9A-Za-z]/g,(function(n){var o;return String.fromCodePoint((null!==(o=n.codePointAt(0))&&void 0!==o?o:0)-65248)}))}export{n as zenkakuAlphanumericalsToHankaku};