ahegao 1.69.43 → 1.69.46

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.
Files changed (37) hide show
  1. package/dist/index.js +9 -25
  2. package/dist/structures/structs.js +45 -46
  3. package/dist/types/classes.js +122 -121
  4. package/dist/types/discord_classes.js +106 -140
  5. package/dist/types/discord_fields.js +24 -28
  6. package/dist/types/discord_types.js +4 -6
  7. package/dist/types/fields.js +232 -238
  8. package/dist/types/types.js +1 -3
  9. package/dist/utils/discord-util.js +235 -370
  10. package/dist/utils/util.js +716 -1142
  11. package/package.json +2 -1
  12. package/dist/data/downside.json +0 -75
  13. package/dist/data/hiragana.json +0 -527
  14. package/dist/data/homoglyphs.json +0 -31790
  15. package/dist/data/letterArray.json +0 -254
  16. package/dist/data/superscript.json +0 -96
  17. package/dist/data/upside.json +0 -78
  18. package/dist/index.d.ts +0 -9
  19. package/dist/index.js.map +0 -1
  20. package/dist/structures/structs.d.ts +0 -77
  21. package/dist/structures/structs.js.map +0 -1
  22. package/dist/types/classes.d.ts +0 -214
  23. package/dist/types/classes.js.map +0 -1
  24. package/dist/types/discord_classes.d.ts +0 -93
  25. package/dist/types/discord_classes.js.map +0 -1
  26. package/dist/types/discord_fields.d.ts +0 -27
  27. package/dist/types/discord_fields.js.map +0 -1
  28. package/dist/types/discord_types.d.ts +0 -51
  29. package/dist/types/discord_types.js.map +0 -1
  30. package/dist/types/fields.d.ts +0 -163
  31. package/dist/types/fields.js.map +0 -1
  32. package/dist/types/types.d.ts +0 -99
  33. package/dist/types/types.js.map +0 -1
  34. package/dist/utils/discord-util.d.ts +0 -198
  35. package/dist/utils/discord-util.js.map +0 -1
  36. package/dist/utils/util.d.ts +0 -503
  37. package/dist/utils/util.js.map +0 -1
package/dist/index.js CHANGED
@@ -1,31 +1,15 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./structures/structs"), exports);
18
- __exportStar(require("./types/classes"), exports);
19
- __exportStar(require("./types/fields"), exports);
20
- __exportStar(require("./types/types"), exports);
21
- __exportStar(require("./types/discord_classes"), exports);
22
- __exportStar(require("./types/discord_fields"), exports);
23
- __exportStar(require("./types/discord_types"), exports);
24
- __exportStar(require("./utils/discord-util"), exports);
25
- __exportStar(require("./utils/util"), exports);
2
+ // export * from "./structures/structs"
3
+ // export * from "./types/classes"
4
+ // export * from "./types/fields"
5
+ // export * from "./types/types"
6
+ // export * from "./types/discord_classes"
7
+ // export * from "./types/discord_fields"
8
+ // export * from "./types/discord_types"
9
+ // export * from "./utils/discord-util"
10
+ // export * from "./utils/util"
26
11
  // import { isLibTs } from "./utils/util"
27
12
  // if(isLibTs())
28
13
  // {
29
14
  // //Testing only allowed here!
30
15
  // }
31
- //# sourceMappingURL=index.js.map
@@ -1,32 +1,32 @@
1
- "use strict";
2
1
  ////////////////////////////////////////////////////////////////////////////////////
3
- var __importDefault = (this && this.__importDefault) || function (mod) {
4
- return (mod && mod.__esModule) ? mod : { "default": mod };
5
- };
6
- var _a;
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.CircularArray = exports.RangedNumber = exports.Cell = exports.Grid = exports.Pos = exports.Lazy = exports.FileInfo = exports.Direction = void 0;
9
- const fs_1 = require("fs");
10
- const path_1 = require("path");
11
- const util_1 = require("../utils/util");
12
- const chalk_1 = __importDefault(require("chalk"));
13
- var Direction;
2
+ import { statSync } from "fs";
3
+ import { basename, dirname } from "path";
4
+ import { random, removeExtension, toExtension } from "../utils/util";
5
+ import chalk from "chalk";
6
+ export var Direction;
14
7
  (function (Direction) {
15
8
  Direction[Direction["UP"] = 0] = "UP";
16
9
  Direction[Direction["RIGHT"] = 1] = "RIGHT";
17
10
  Direction[Direction["DOWN"] = 2] = "DOWN";
18
11
  Direction[Direction["LEFT"] = 3] = "LEFT";
19
- })(Direction || (exports.Direction = Direction = {}));
12
+ })(Direction || (Direction = {}));
20
13
  ////////////////////////////////////////////////////////////////////////////////////
21
- class FileInfo {
14
+ export class FileInfo {
15
+ path;
16
+ fullName;
17
+ extension;
18
+ hasExtension;
19
+ name;
20
+ directory;
21
+ _stats;
22
22
  constructor(path) {
23
23
  this.path = path;
24
- this.directory = (0, path_1.dirname)(path);
25
- this.fullName = (0, path_1.basename)(path);
26
- this.extension = (0, util_1.toExtension)(this.fullName);
24
+ this.directory = dirname(path);
25
+ this.fullName = basename(path);
26
+ this.extension = toExtension(this.fullName);
27
27
  this.hasExtension = this.extension.length > 0;
28
- this.name = (0, util_1.removeExtension)(this.fullName);
29
- this._stats = new Lazy(() => (0, fs_1.statSync)(this.path));
28
+ this.name = removeExtension(this.fullName);
29
+ this._stats = new Lazy(() => statSync(this.path));
30
30
  }
31
31
  get stats() {
32
32
  return this._stats.get();
@@ -41,11 +41,12 @@ class FileInfo {
41
41
  return this.stats.isSymbolicLink();
42
42
  }
43
43
  }
44
- exports.FileInfo = FileInfo;
45
44
  function test(getter) {
46
45
  return getter();
47
46
  }
48
- class Lazy {
47
+ export class Lazy {
48
+ getter;
49
+ item;
49
50
  constructor(getter) {
50
51
  this.getter = getter;
51
52
  }
@@ -55,15 +56,16 @@ class Lazy {
55
56
  this.item = this.getter();
56
57
  }
57
58
  catch (e) {
58
- console.log(chalk_1.default.redBright(`Error: Lazy initialization failed!`));
59
+ console.log(chalk.redBright(`Error: Lazy initialization failed!`));
59
60
  throw e;
60
61
  }
61
62
  }
62
63
  return this.item;
63
64
  }
64
65
  }
65
- exports.Lazy = Lazy;
66
- class Pos {
66
+ export class Pos {
67
+ x;
68
+ y;
67
69
  constructor(x = 0, y = 0) {
68
70
  this.x = x;
69
71
  this.y = y;
@@ -92,12 +94,13 @@ class Pos {
92
94
  return new Pos(x, y);
93
95
  }
94
96
  }
95
- exports.Pos = Pos;
96
- class Grid {
97
+ export class Grid {
98
+ width;
99
+ height;
100
+ cells = new Map;
97
101
  constructor(width, height, defaultSupplier) {
98
102
  this.width = width;
99
103
  this.height = height;
100
- this.cells = new Map;
101
104
  this.width = width;
102
105
  this.height = height;
103
106
  for (let y = 0; y < this.height; ++y) {
@@ -116,10 +119,9 @@ class Grid {
116
119
  this.cells.get(y).set(x, item);
117
120
  }
118
121
  }
119
- exports.Grid = Grid;
120
- class Cell {
122
+ export class Cell {
123
+ walls = new Map;
121
124
  constructor(up, right, down, left) {
122
- this.walls = new Map;
123
125
  this.walls.set(Direction.UP, up);
124
126
  this.walls.set(Direction.RIGHT, right);
125
127
  this.walls.set(Direction.DOWN, down);
@@ -138,40 +140,39 @@ class Cell {
138
140
  this.walls.set(direction, open);
139
141
  }
140
142
  }
141
- exports.Cell = Cell;
142
- class RangedNumber {
143
+ export class RangedNumber {
144
+ minValue;
145
+ maxValue;
143
146
  constructor(minValue, maxValue) {
144
147
  this.minValue = minValue;
145
148
  this.maxValue = maxValue;
146
149
  }
150
+ static ONE = this.value(1);
151
+ static ZERO = this.value(0);
152
+ static MINUS_ONE = this.value(-1);
153
+ static ZERO_TO_ONE = this.range(0, 1);
154
+ static MINUS_ONE_TO_ONE = this.range(-1, 1);
147
155
  static arrayLimits(array) {
148
156
  return this.range(0, array.length - 1);
149
157
  }
150
158
  static range(minValue, maxValue) {
151
- return new _a(minValue, maxValue);
159
+ return new RangedNumber(minValue, maxValue);
152
160
  }
153
161
  static value(value) {
154
- return new _a(value, value);
162
+ return new RangedNumber(value, value);
155
163
  }
156
164
  get() {
157
- return (0, util_1.random)(this.minValue, this.maxValue);
165
+ return random(this.minValue, this.maxValue);
158
166
  }
159
167
  isWithin(value) {
160
168
  return this.minValue <= value && value <= this.maxValue;
161
169
  }
162
170
  }
163
- exports.RangedNumber = RangedNumber;
164
- _a = RangedNumber;
165
- RangedNumber.ONE = _a.value(1);
166
- RangedNumber.ZERO = _a.value(0);
167
- RangedNumber.MINUS_ONE = _a.value(-1);
168
- RangedNumber.ZERO_TO_ONE = _a.range(0, 1);
169
- RangedNumber.MINUS_ONE_TO_ONE = _a.range(-1, 1);
170
171
  ////////////////////////////////////////////////////////////////////////////////////
171
- class CircularArray extends Array {
172
+ export class CircularArray extends Array {
173
+ arr = [];
172
174
  constructor(maxSize) {
173
175
  super(maxSize);
174
- this.arr = [];
175
176
  }
176
177
  push(...items) {
177
178
  for (const item of items) {
@@ -183,5 +184,3 @@ class CircularArray extends Array {
183
184
  return this.length;
184
185
  }
185
186
  }
186
- exports.CircularArray = CircularArray;
187
- //# sourceMappingURL=structs.js.map