@konoui/mjimage 0.0.20 → 0.0.21
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.
|
@@ -23,15 +23,11 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
23
23
|
}
|
|
24
24
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
25
25
|
};
|
|
26
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
27
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
28
|
-
};
|
|
29
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
27
|
exports.Parser = exports.blockWrapper = exports.BlockIsolated = exports.BlockRun = exports.BlockThree = exports.BlockPair = exports.BlockShoKan = exports.BlockDaiKan = exports.BlockAnKan = exports.BlockPon = exports.BlockChi = exports.Block = exports.Tile = exports.tileSortFunc = void 0;
|
|
31
28
|
exports.isType = isType;
|
|
32
29
|
var lexer_1 = require("./lexer");
|
|
33
30
|
var _1 = require("./");
|
|
34
|
-
var assert_1 = __importDefault(require("assert"));
|
|
35
31
|
var tileSortFunc = function (i, j) {
|
|
36
32
|
var _a;
|
|
37
33
|
if (i.t == j.t) {
|
|
@@ -165,7 +161,8 @@ var Block = (function () {
|
|
|
165
161
|
Block.prototype.minTile = function () {
|
|
166
162
|
if (this.is(_1.BLOCK.CHI))
|
|
167
163
|
return this.clone().tiles.sort(exports.tileSortFunc)[0];
|
|
168
|
-
|
|
164
|
+
if (this.is(_1.BLOCK.HAND))
|
|
165
|
+
throw new Error("[debug] mintile() is called with ".concat(this.toString()));
|
|
169
166
|
return this.tiles[0];
|
|
170
167
|
};
|
|
171
168
|
Block.prototype.clone = function () {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@konoui/mjimage",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.21",
|
|
4
4
|
"description": "Generates Mahjong tiles in SVG format.",
|
|
5
5
|
"author": "konoui",
|
|
6
6
|
"license": "MIT",
|
|
@@ -65,6 +65,7 @@
|
|
|
65
65
|
"@types/jest": "^29.5.5",
|
|
66
66
|
"@types/js-yaml": "^4.0.9",
|
|
67
67
|
"@types/svgdom": "^0.1.0",
|
|
68
|
+
"assert": "^2.1.0",
|
|
68
69
|
"buffer": "^6.0.3",
|
|
69
70
|
"parcel": "^2.12.0",
|
|
70
71
|
"parcel-reporter-static-files-copy": "^1.5.2",
|