js-dev-tool 1.2.16 → 1.2.19
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/README.md +0 -12
- package/common/index.d.ts +36 -1
- package/common/index.js +41 -0
- package/extras/gzip-tool.d.ts +34 -0
- package/extras/gzip-tool.js +60 -0
- package/package.json +5 -3
- package/extras/cc-map.d.ts +0 -141
- package/extras/cc-map.js +0 -140
package/README.md
CHANGED
|
@@ -34,7 +34,6 @@ This section reflects the current `package.json#exports` and `package.json#files
|
|
|
34
34
|
| `js-dev-tool/progress` | Progress renderer, spinner helpers, webpack / browserify progress hooks |
|
|
35
35
|
| `js-dev-tool/progress/progress-extras` | Environment and webpack-version helpers |
|
|
36
36
|
| `js-dev-tool/extras/algorithms` | Binary-search helper |
|
|
37
|
-
| `js-dev-tool/extras/cc-map` | Character-code map |
|
|
38
37
|
| `js-dev-tool/extras/jsonl` | JSONL readers, JSONL-to-array/map helpers, and `jsonMinify` |
|
|
39
38
|
| `js-dev-tool/extras/json-minify` | `jsonMinify` |
|
|
40
39
|
| `js-dev-tool/extras/progress-light` | Small fixed-frame spinner |
|
|
@@ -133,17 +132,6 @@ const index = bnSearch(values, 7, (left, right) => left - right);
|
|
|
133
132
|
console.log(index); // 2
|
|
134
133
|
```
|
|
135
134
|
|
|
136
|
-
### `js-dev-tool/extras/cc-map`
|
|
137
|
-
|
|
138
|
-
Exports a character-code map object. It is most useful when you want named constants for ASCII / control-character comparisons.
|
|
139
|
-
|
|
140
|
-
```js
|
|
141
|
-
const CC_MAP = require("js-dev-tool/extras/cc-map");
|
|
142
|
-
|
|
143
|
-
console.log(CC_MAP.LF); // 10
|
|
144
|
-
console.log(CC_MAP.DOUBLE_QUOTE); // 34
|
|
145
|
-
```
|
|
146
|
-
|
|
147
135
|
### `js-dev-tool/extras/jsonl`
|
|
148
136
|
|
|
149
137
|
Exports:
|
package/common/index.d.ts
CHANGED
|
@@ -41,4 +41,39 @@ export function renderLine(msg?: string, row?: number): void;
|
|
|
41
41
|
* @param {boolean} enabled
|
|
42
42
|
* @param {NodeJS.WriteStream} [output]
|
|
43
43
|
*/
|
|
44
|
-
export function cursor(enabled: boolean, output?: NodeJS.WriteStream): void;
|
|
44
|
+
export function cursor(enabled: boolean, output?: NodeJS.WriteStream): void;
|
|
45
|
+
/**
|
|
46
|
+
* Returns `true` if the given module is the entry point of the current process.
|
|
47
|
+
*
|
|
48
|
+
* Accepts either a `module` object (CommonJS) or a file path string,
|
|
49
|
+
* making it usable from both CommonJS and ESM contexts.
|
|
50
|
+
*
|
|
51
|
+
* Equivalent to `import.meta.main` in Deno / Bun,
|
|
52
|
+
* or `process.argv[1] === fileURLToPath(import.meta.url)` in ESM.
|
|
53
|
+
*
|
|
54
|
+
* @param {Partial<NodeJS.Module> | string} modOrFilePath
|
|
55
|
+
* Pass `module` or `__filename` (CommonJS),
|
|
56
|
+
* or `fileURLToPath(import.meta.url)` (ESM).
|
|
57
|
+
* @returns {boolean} `true` if the calling module is the entry point.
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* // CommonJS — via module object:
|
|
61
|
+
* const { isMain } = require("js-dev-tool/common");
|
|
62
|
+
* if (isMain(module)) { main(); }
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* // CommonJS — via __filename:
|
|
66
|
+
* const { isMain } = require("js-dev-tool/common");
|
|
67
|
+
* if (isMain(__filename)) { main(); }
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* // ESM — via fileURLToPath:
|
|
71
|
+
* import { isMain } from "js-dev-tool/common";
|
|
72
|
+
* import { fileURLToPath } from "node:url";
|
|
73
|
+
* if (isMain(fileURLToPath(import.meta.url))) { main(); }
|
|
74
|
+
*
|
|
75
|
+
* @since Node.js v0.1.16
|
|
76
|
+
* @verified CJS: Confirmed working on Node.js v11.15.0 — v26.3.0.
|
|
77
|
+
* @verified ESM: Confirmed working on Node.js v12.22.11 — v26.3.0.
|
|
78
|
+
*/
|
|
79
|
+
export function isMain(modOrFilePath: Partial<NodeJS.Module> | string): boolean;
|
package/common/index.js
CHANGED
|
@@ -55,9 +55,50 @@ const cursor = (enabled, output = process.stderr) => {
|
|
|
55
55
|
output.write("\x1B[?25l");
|
|
56
56
|
}
|
|
57
57
|
};
|
|
58
|
+
/**
|
|
59
|
+
* Returns `true` if the given module is the entry point of the current process.
|
|
60
|
+
*
|
|
61
|
+
* Accepts either a `module` object (CommonJS) or a file path string,
|
|
62
|
+
* making it usable from both CommonJS and ESM contexts.
|
|
63
|
+
*
|
|
64
|
+
* Equivalent to `import.meta.main` in Deno / Bun,
|
|
65
|
+
* or `process.argv[1] === fileURLToPath(import.meta.url)` in ESM.
|
|
66
|
+
*
|
|
67
|
+
* @param {Partial<NodeJS.Module> | string} modOrFilePath
|
|
68
|
+
* Pass `module` or `__filename` (CommonJS),
|
|
69
|
+
* or `fileURLToPath(import.meta.url)` (ESM).
|
|
70
|
+
* @returns {boolean} `true` if the calling module is the entry point.
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* // CommonJS — via module object:
|
|
74
|
+
* const { isMain } = require("js-dev-tool/common");
|
|
75
|
+
* if (isMain(module)) { main(); }
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* // CommonJS — via __filename:
|
|
79
|
+
* const { isMain } = require("js-dev-tool/common");
|
|
80
|
+
* if (isMain(__filename)) { main(); }
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* // ESM — via fileURLToPath:
|
|
84
|
+
* import { isMain } from "js-dev-tool/common";
|
|
85
|
+
* import { fileURLToPath } from "node:url";
|
|
86
|
+
* if (isMain(fileURLToPath(import.meta.url))) { main(); }
|
|
87
|
+
*
|
|
88
|
+
* @since Node.js v0.1.16
|
|
89
|
+
* @verified CJS: Confirmed working on Node.js v11.15.0 — v26.3.0.
|
|
90
|
+
* @verified ESM: Confirmed working on Node.js v12.22.11 — v26.3.0.
|
|
91
|
+
*/
|
|
92
|
+
function isMain(modOrFilePath) {
|
|
93
|
+
if (typeof modOrFilePath === "string") {
|
|
94
|
+
return process.argv[1] === modOrFilePath;
|
|
95
|
+
}
|
|
96
|
+
return require.main === modOrFilePath;
|
|
97
|
+
}
|
|
58
98
|
module.exports = {
|
|
59
99
|
checkParentDirectory,
|
|
60
100
|
createLogStreamAndResolvePath,
|
|
61
101
|
renderLine,
|
|
62
102
|
cursor,
|
|
103
|
+
isMain,
|
|
63
104
|
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
3
|
+
// Copyright (C) 2026 jeffy-g <hirotom1107@gmail.com>
|
|
4
|
+
// Released under the MIT license
|
|
5
|
+
// https://opensource.org/licenses/mit-license.php
|
|
6
|
+
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* @file extras/gzip-tool.d.ts
|
|
10
|
+
*/
|
|
11
|
+
import type { InputType } from "zlib";
|
|
12
|
+
/**
|
|
13
|
+
* Compresses input data as gzip and optionally normalizes the header timestamp.
|
|
14
|
+
*
|
|
15
|
+
* The compressed output is produced with level 9 and the default zlib strategy.
|
|
16
|
+
* When `useZeroTimestamp` is enabled, the gzip `mtime` header is overwritten with `0`
|
|
17
|
+
* so repeated runs with the same input produce stable binary output.
|
|
18
|
+
*
|
|
19
|
+
* @param {InputType} data raw data to compress
|
|
20
|
+
* @param {boolean=} [useZeroTimestamp=true] when `true`, zeroes the gzip `mtime` header. (default __`true`__)
|
|
21
|
+
* @returns {Buffer} gzip-compressed binary data
|
|
22
|
+
*/
|
|
23
|
+
export function gzip(data: InputType, useZeroTimestamp?: boolean): Buffer;
|
|
24
|
+
/**
|
|
25
|
+
* Encodes binary data as Base64 and formats it as a JavaScript string-literal fragment.
|
|
26
|
+
*
|
|
27
|
+
* Each wrapped line ends with a trailing backslash so the returned text can be pasted
|
|
28
|
+
* directly into source code as a multi-line continued string literal.
|
|
29
|
+
*
|
|
30
|
+
* @param {Uint8Array} rawData raw bytes to encode
|
|
31
|
+
* @param {number=} [wrapSize=100] max Base64 characters per physical line. (default __`100`__)
|
|
32
|
+
* @returns {string} Base64 text wrapped with `\\\n` line continuations
|
|
33
|
+
*/
|
|
34
|
+
export function toBase64SourceLiteral(rawData: Uint8Array, wrapSize?: number): string;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
3
|
+
// Copyright (C) 2026 jeffy-g <hirotom1107@gmail.com>
|
|
4
|
+
// Released under the MIT license
|
|
5
|
+
// https://opensource.org/licenses/mit-license.php
|
|
6
|
+
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
7
|
+
*/
|
|
8
|
+
"use strict";
|
|
9
|
+
/**
|
|
10
|
+
* @file extras/gzip-tool.js
|
|
11
|
+
*/
|
|
12
|
+
const { gzipSync, constants } = require("zlib");
|
|
13
|
+
/**
|
|
14
|
+
* @import { InputType } from "zlib";
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Compresses input data as gzip and optionally normalizes the header timestamp.
|
|
18
|
+
*
|
|
19
|
+
* The compressed output is produced with level 9 and the default zlib strategy.
|
|
20
|
+
* When `useZeroTimestamp` is enabled, the gzip `mtime` header is overwritten with `0`
|
|
21
|
+
* so repeated runs with the same input produce stable binary output.
|
|
22
|
+
*
|
|
23
|
+
* @param {InputType} data raw data to compress
|
|
24
|
+
* @param {boolean=} [useZeroTimestamp=true] when `true`, zeroes the gzip `mtime` header. (default __`true`__)
|
|
25
|
+
* @returns {Buffer} gzip-compressed binary data
|
|
26
|
+
*/
|
|
27
|
+
function gzip(data, useZeroTimestamp = true) {
|
|
28
|
+
const compressed = gzipSync(data, {
|
|
29
|
+
level: 9, strategy: constants.Z_DEFAULT_STRATEGY
|
|
30
|
+
});
|
|
31
|
+
if (useZeroTimestamp) {
|
|
32
|
+
compressed.writeUInt32LE(0, 4);
|
|
33
|
+
}
|
|
34
|
+
return compressed;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Encodes binary data as Base64 and formats it as a JavaScript string-literal fragment.
|
|
38
|
+
*
|
|
39
|
+
* Each wrapped line ends with a trailing backslash so the returned text can be pasted
|
|
40
|
+
* directly into source code as a multi-line continued string literal.
|
|
41
|
+
*
|
|
42
|
+
* @param {Uint8Array} rawData raw bytes to encode
|
|
43
|
+
* @param {number=} [wrapSize=100] max Base64 characters per physical line. (default __`100`__)
|
|
44
|
+
* @returns {string} Base64 text wrapped with `\\\n` line continuations
|
|
45
|
+
*/
|
|
46
|
+
function toBase64SourceLiteral(rawData, wrapSize = 100) {
|
|
47
|
+
if (!Number.isFinite(wrapSize)) throw new Error(`Invalid wrapSize: ${wrapSize}`);
|
|
48
|
+
if (!Number.isInteger(wrapSize)) throw new Error(`wrapSize is not a integer - ${wrapSize}`);
|
|
49
|
+
if (wrapSize > 2048) throw new Error(`"wrapSize" is expected to be 2048 or less - ${wrapSize}`);
|
|
50
|
+
if (wrapSize < 1) throw new Error(`A wrapSize of 0 or less will result in an infinite loop, so please make it 1 or greater. - ${wrapSize}`);
|
|
51
|
+
const base64 = Buffer.from(rawData).toString("base64");
|
|
52
|
+
let wrapped = "";
|
|
53
|
+
for (let offset = 0, L = base64.length; offset < L;) {
|
|
54
|
+
wrapped += `${base64.slice(offset, offset += wrapSize)}\\\n`;
|
|
55
|
+
}
|
|
56
|
+
return wrapped.slice(0, -2);
|
|
57
|
+
}
|
|
58
|
+
module.exports = {
|
|
59
|
+
gzip, toBase64SourceLiteral
|
|
60
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "js-dev-tool",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.19",
|
|
4
|
+
"type": "commonjs",
|
|
4
5
|
"bin": {
|
|
5
6
|
"jstool": "tools.js",
|
|
6
7
|
"tgl-jsonl": "extras/toggle-jsonl.js"
|
|
@@ -74,6 +75,7 @@
|
|
|
74
75
|
"!scripts/bin",
|
|
75
76
|
"!publish-version.json",
|
|
76
77
|
"!scripts/*.mjs",
|
|
78
|
+
"!scripts/smoke",
|
|
77
79
|
"!regex-test.ts",
|
|
78
80
|
"!extras/npm",
|
|
79
81
|
"!/**/*.png",
|
|
@@ -87,12 +89,12 @@
|
|
|
87
89
|
},
|
|
88
90
|
"dependencies": {
|
|
89
91
|
"colors.ts": "^1.0.20",
|
|
90
|
-
"fflate": "^0.8.
|
|
92
|
+
"fflate": "^0.8.3",
|
|
91
93
|
"literate-regex": "^0.6.11",
|
|
92
94
|
"mini-semaphore": "^1.5.4",
|
|
93
95
|
"replace": "^1.2.2",
|
|
94
96
|
"rm-cstyle-cmts": "^3.4.4",
|
|
95
|
-
"terser": "^5.
|
|
97
|
+
"terser": "^5.48.0",
|
|
96
98
|
"tin-args": "^0.1.6",
|
|
97
99
|
"ts-cc-map": "^1.1.0"
|
|
98
100
|
}
|
package/extras/cc-map.d.ts
DELETED
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
3
|
-
// Copyright (C) 2026 jeffy-g <hirotom1107@gmail.com>
|
|
4
|
-
// Released under the MIT license
|
|
5
|
-
// https://opensource.org/licenses/mit-license.php
|
|
6
|
-
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
7
|
-
*/
|
|
8
|
-
/**
|
|
9
|
-
* @file extras/cc-map.d.ts
|
|
10
|
-
*/
|
|
11
|
-
export declare type TCC_MAP = {
|
|
12
|
-
/** `\u0000` */ NULL: 0;
|
|
13
|
-
/** `\u0001` */ SOH: 1;
|
|
14
|
-
/** `\u0002` */ STX: 2;
|
|
15
|
-
/** `\u0003` */ ETX: 3;
|
|
16
|
-
/** `\u0004` */ EOT: 4;
|
|
17
|
-
/** `\u0005` */ ENQ: 5;
|
|
18
|
-
/** `\u0006` */ ACK: 6;
|
|
19
|
-
/** `\u0007` */ BEL: 7;
|
|
20
|
-
/** `\u0008` */ BS: 8;
|
|
21
|
-
/** `\t` */ TAB: 9;
|
|
22
|
-
/** `\n` */ LF: 10;
|
|
23
|
-
/** `\u000b` */ VT: 11;
|
|
24
|
-
/** `\f` */ FF: 12;
|
|
25
|
-
/** `\r` */ CR: 13;
|
|
26
|
-
/** `\u000e` */ SO: 14;
|
|
27
|
-
/** `\u000f` */ SI: 15;
|
|
28
|
-
/** `\u0010` */ DLE: 16;
|
|
29
|
-
/** `\u0011` */ DC1: 17;
|
|
30
|
-
/** `\u0012` */ DC2: 18;
|
|
31
|
-
/** `\u0013` */ DC3: 19;
|
|
32
|
-
/** `\u0014` */ DC4: 20;
|
|
33
|
-
/** `\u0015` */ NAK: 21;
|
|
34
|
-
/** `\u0016` */ SYN: 22;
|
|
35
|
-
/** `\u0017` */ ETB: 23;
|
|
36
|
-
/** `\u0018` */ CAN: 24;
|
|
37
|
-
/** `\u0019` */ EM: 25;
|
|
38
|
-
/** `\u001a` */ SUB: 26;
|
|
39
|
-
/** `\u001b` */ ESC: 27;
|
|
40
|
-
/** `\u001c` */ FS: 28;
|
|
41
|
-
/** `\u001d` */ GS: 29;
|
|
42
|
-
/** `\u001e` */ RS: 30;
|
|
43
|
-
/** `\u001f` */ US: 31;
|
|
44
|
-
/** ` ` */ SPACE: 32;
|
|
45
|
-
/** `!` */ EXCLAMATION: 33;
|
|
46
|
-
/** `"` */ DOUBLE_QUOTE: 34;
|
|
47
|
-
/** `#` */ HASH: 35;
|
|
48
|
-
/** `$` */ DOLLAR: 36;
|
|
49
|
-
/** `%` */ PERCENT: 37;
|
|
50
|
-
/** `&` */ AMPERSAND: 38;
|
|
51
|
-
/** `'` */ SINGLE_QUOTE: 39;
|
|
52
|
-
/** `(` */ LEFT_PAREN: 40;
|
|
53
|
-
/** `)` */ RIGHT_PAREN: 41;
|
|
54
|
-
/** `*` */ ASTERISK: 42;
|
|
55
|
-
/** `+` */ PLUS: 43;
|
|
56
|
-
/** `,` */ COMMA: 44;
|
|
57
|
-
/** `-` */ MINUS: 45;
|
|
58
|
-
/** `.` */ PERIOD: 46;
|
|
59
|
-
/** `/` */ SLASH: 47;
|
|
60
|
-
/** `0` */ ZERO: 48;
|
|
61
|
-
/** `1` */ ONE: 49;
|
|
62
|
-
/** `2` */ TWO: 50;
|
|
63
|
-
/** `3` */ THREE: 51;
|
|
64
|
-
/** `4` */ FOUR: 52;
|
|
65
|
-
/** `5` */ FIVE: 53;
|
|
66
|
-
/** `6` */ SIX: 54;
|
|
67
|
-
/** `7` */ SEVEN: 55;
|
|
68
|
-
/** `8` */ EIGHT: 56;
|
|
69
|
-
/** `9` */ NINE: 57;
|
|
70
|
-
/** `:` */ COLON: 58;
|
|
71
|
-
/** `;` */ SEMICOLON: 59;
|
|
72
|
-
/** `<` */ LESS_THAN: 60;
|
|
73
|
-
/** `=` */ EQUAL: 61;
|
|
74
|
-
/** `>` */ GREATER_THAN: 62;
|
|
75
|
-
/** `?` */ QUESTION: 63;
|
|
76
|
-
/** `@` */ AT: 64;
|
|
77
|
-
/** `A` */ A: 65;
|
|
78
|
-
/** `B` */ B: 66;
|
|
79
|
-
/** `C` */ C: 67;
|
|
80
|
-
/** `D` */ D: 68;
|
|
81
|
-
/** `E` */ E: 69;
|
|
82
|
-
/** `F` */ F: 70;
|
|
83
|
-
/** `G` */ G: 71;
|
|
84
|
-
/** `H` */ H: 72;
|
|
85
|
-
/** `I` */ I: 73;
|
|
86
|
-
/** `J` */ J: 74;
|
|
87
|
-
/** `K` */ K: 75;
|
|
88
|
-
/** `L` */ L: 76;
|
|
89
|
-
/** `M` */ M: 77;
|
|
90
|
-
/** `N` */ N: 78;
|
|
91
|
-
/** `O` */ O: 79;
|
|
92
|
-
/** `P` */ P: 80;
|
|
93
|
-
/** `Q` */ Q: 81;
|
|
94
|
-
/** `R` */ R: 82;
|
|
95
|
-
/** `S` */ S: 83;
|
|
96
|
-
/** `T` */ T: 84;
|
|
97
|
-
/** `U` */ U: 85;
|
|
98
|
-
/** `V` */ V: 86;
|
|
99
|
-
/** `W` */ W: 87;
|
|
100
|
-
/** `X` */ X: 88;
|
|
101
|
-
/** `Y` */ Y: 89;
|
|
102
|
-
/** `Z` */ Z: 90;
|
|
103
|
-
/** `[` */ LEFT_BRACKET: 91;
|
|
104
|
-
/** `\` */ BACKSLASH: 92;
|
|
105
|
-
/** `]` */ RIGHT_BRACKET: 93;
|
|
106
|
-
/** `^` */ CARET: 94;
|
|
107
|
-
/** `_` */ UNDERSCORE: 95;
|
|
108
|
-
/** __`__ */ GRAVE: 96;
|
|
109
|
-
/** `a` */ a: 97;
|
|
110
|
-
/** `b` */ b: 98;
|
|
111
|
-
/** `c` */ c: 99;
|
|
112
|
-
/** `d` */ d: 100;
|
|
113
|
-
/** `e` */ e: 101;
|
|
114
|
-
/** `f` */ f: 102;
|
|
115
|
-
/** `g` */ g: 103;
|
|
116
|
-
/** `h` */ h: 104;
|
|
117
|
-
/** `i` */ i: 105;
|
|
118
|
-
/** `j` */ j: 106;
|
|
119
|
-
/** `k` */ k: 107;
|
|
120
|
-
/** `l` */ l: 108;
|
|
121
|
-
/** `m` */ m: 109;
|
|
122
|
-
/** `n` */ n: 110;
|
|
123
|
-
/** `o` */ o: 111;
|
|
124
|
-
/** `p` */ p: 112;
|
|
125
|
-
/** `q` */ q: 113;
|
|
126
|
-
/** `r` */ r: 114;
|
|
127
|
-
/** `s` */ s: 115;
|
|
128
|
-
/** `t` */ t: 116;
|
|
129
|
-
/** `u` */ u: 117;
|
|
130
|
-
/** `v` */ v: 118;
|
|
131
|
-
/** `w` */ w: 119;
|
|
132
|
-
/** `x` */ x: 120;
|
|
133
|
-
/** `y` */ y: 121;
|
|
134
|
-
/** `z` */ z: 122;
|
|
135
|
-
/** `{` */ LEFT_BRACE: 123;
|
|
136
|
-
/** `|` */ PIPE: 124;
|
|
137
|
-
/** `}` */ RIGHT_BRACE: 125;
|
|
138
|
-
/** `~` */ TILDE: 126;
|
|
139
|
-
};
|
|
140
|
-
declare const CC_MAP: TCC_MAP;
|
|
141
|
-
export = CC_MAP;
|
package/extras/cc-map.js
DELETED
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
3
|
-
// Copyright (C) 2026 jeffy-g <hirotom1107@gmail.com>
|
|
4
|
-
// Released under the MIT license
|
|
5
|
-
// https://opensource.org/licenses/mit-license.php
|
|
6
|
-
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
7
|
-
*/
|
|
8
|
-
/**
|
|
9
|
-
* @file extras/cc-map.js
|
|
10
|
-
* @import { TCC_MAP } from "./cc-map";
|
|
11
|
-
*/
|
|
12
|
-
module.exports = /** @type {TCC_MAP} */({
|
|
13
|
-
/** `\u0000` */ NULL: 0,
|
|
14
|
-
/** `\u0001` */ SOH: 1,
|
|
15
|
-
/** `\u0002` */ STX: 2,
|
|
16
|
-
/** `\u0003` */ ETX: 3,
|
|
17
|
-
/** `\u0004` */ EOT: 4,
|
|
18
|
-
/** `\u0005` */ ENQ: 5,
|
|
19
|
-
/** `\u0006` */ ACK: 6,
|
|
20
|
-
/** `\u0007` */ BEL: 7,
|
|
21
|
-
/** `\u0008` */ BS: 8,
|
|
22
|
-
/** `\t` */ TAB: 9,
|
|
23
|
-
/** `\n` */ LF: 10,
|
|
24
|
-
/** `\u000b` */ VT: 11,
|
|
25
|
-
/** `\f` */ FF: 12,
|
|
26
|
-
/** `\r` */ CR: 13,
|
|
27
|
-
/** `\u000e` */ SO: 14,
|
|
28
|
-
/** `\u000f` */ SI: 15,
|
|
29
|
-
/** `\u0010` */ DLE: 16,
|
|
30
|
-
/** `\u0011` */ DC1: 17,
|
|
31
|
-
/** `\u0012` */ DC2: 18,
|
|
32
|
-
/** `\u0013` */ DC3: 19,
|
|
33
|
-
/** `\u0014` */ DC4: 20,
|
|
34
|
-
/** `\u0015` */ NAK: 21,
|
|
35
|
-
/** `\u0016` */ SYN: 22,
|
|
36
|
-
/** `\u0017` */ ETB: 23,
|
|
37
|
-
/** `\u0018` */ CAN: 24,
|
|
38
|
-
/** `\u0019` */ EM: 25,
|
|
39
|
-
/** `\u001a` */ SUB: 26,
|
|
40
|
-
/** `\u001b` */ ESC: 27,
|
|
41
|
-
/** `\u001c` */ FS: 28,
|
|
42
|
-
/** `\u001d` */ GS: 29,
|
|
43
|
-
/** `\u001e` */ RS: 30,
|
|
44
|
-
/** `\u001f` */ US: 31,
|
|
45
|
-
/** " " */ SPACE: 32,
|
|
46
|
-
/** `!` */ EXCLAMATION: 33,
|
|
47
|
-
/** `"` */ DOUBLE_QUOTE: 34,
|
|
48
|
-
/** `#` */ HASH: 35,
|
|
49
|
-
/** `$` */ DOLLAR: 36,
|
|
50
|
-
/** `%` */ PERCENT: 37,
|
|
51
|
-
/** `&` */ AMPERSAND: 38,
|
|
52
|
-
/** `'` */ SINGLE_QUOTE: 39,
|
|
53
|
-
/** `(` */ LEFT_PAREN: 40,
|
|
54
|
-
/** `)` */ RIGHT_PAREN: 41,
|
|
55
|
-
/** `*` */ ASTERISK: 42,
|
|
56
|
-
/** `+` */ PLUS: 43,
|
|
57
|
-
/** `,` */ COMMA: 44,
|
|
58
|
-
/** `-` */ MINUS: 45,
|
|
59
|
-
/** `.` */ PERIOD: 46,
|
|
60
|
-
/** `/` */ SLASH: 47,
|
|
61
|
-
/** `0` */ ZERO: 48,
|
|
62
|
-
/** `1` */ ONE: 49,
|
|
63
|
-
/** `2` */ TWO: 50,
|
|
64
|
-
/** `3` */ THREE: 51,
|
|
65
|
-
/** `4` */ FOUR: 52,
|
|
66
|
-
/** `5` */ FIVE: 53,
|
|
67
|
-
/** `6` */ SIX: 54,
|
|
68
|
-
/** `7` */ SEVEN: 55,
|
|
69
|
-
/** `8` */ EIGHT: 56,
|
|
70
|
-
/** `9` */ NINE: 57,
|
|
71
|
-
/** `:` */ COLON: 58,
|
|
72
|
-
/** `;` */ SEMICOLON: 59,
|
|
73
|
-
/** `<` */ LESS_THAN: 60,
|
|
74
|
-
/** `=` */ EQUAL: 61,
|
|
75
|
-
/** `>` */ GREATER_THAN: 62,
|
|
76
|
-
/** `?` */ QUESTION: 63,
|
|
77
|
-
/** `@` */ AT: 64,
|
|
78
|
-
/** `A` */ A: 65,
|
|
79
|
-
/** `B` */ B: 66,
|
|
80
|
-
/** `C` */ C: 67,
|
|
81
|
-
/** `D` */ D: 68,
|
|
82
|
-
/** `E` */ E: 69,
|
|
83
|
-
/** `F` */ F: 70,
|
|
84
|
-
/** `G` */ G: 71,
|
|
85
|
-
/** `H` */ H: 72,
|
|
86
|
-
/** `I` */ I: 73,
|
|
87
|
-
/** `J` */ J: 74,
|
|
88
|
-
/** `K` */ K: 75,
|
|
89
|
-
/** `L` */ L: 76,
|
|
90
|
-
/** `M` */ M: 77,
|
|
91
|
-
/** `N` */ N: 78,
|
|
92
|
-
/** `O` */ O: 79,
|
|
93
|
-
/** `P` */ P: 80,
|
|
94
|
-
/** `Q` */ Q: 81,
|
|
95
|
-
/** `R` */ R: 82,
|
|
96
|
-
/** `S` */ S: 83,
|
|
97
|
-
/** `T` */ T: 84,
|
|
98
|
-
/** `U` */ U: 85,
|
|
99
|
-
/** `V` */ V: 86,
|
|
100
|
-
/** `W` */ W: 87,
|
|
101
|
-
/** `X` */ X: 88,
|
|
102
|
-
/** `Y` */ Y: 89,
|
|
103
|
-
/** `Z` */ Z: 90,
|
|
104
|
-
/** `[` */ LEFT_BRACKET: 91,
|
|
105
|
-
/** `\` */ BACKSLASH: 92,
|
|
106
|
-
/** `]` */ RIGHT_BRACKET: 93,
|
|
107
|
-
/** `^` */ CARET: 94,
|
|
108
|
-
/** `_` */ UNDERSCORE: 95,
|
|
109
|
-
/** __`__ */ GRAVE: 96,
|
|
110
|
-
/** `a` */ a: 97,
|
|
111
|
-
/** `b` */ b: 98,
|
|
112
|
-
/** `c` */ c: 99,
|
|
113
|
-
/** `d` */ d: 100,
|
|
114
|
-
/** `e` */ e: 101,
|
|
115
|
-
/** `f` */ f: 102,
|
|
116
|
-
/** `g` */ g: 103,
|
|
117
|
-
/** `h` */ h: 104,
|
|
118
|
-
/** `i` */ i: 105,
|
|
119
|
-
/** `j` */ j: 106,
|
|
120
|
-
/** `k` */ k: 107,
|
|
121
|
-
/** `l` */ l: 108,
|
|
122
|
-
/** `m` */ m: 109,
|
|
123
|
-
/** `n` */ n: 110,
|
|
124
|
-
/** `o` */ o: 111,
|
|
125
|
-
/** `p` */ p: 112,
|
|
126
|
-
/** `q` */ q: 113,
|
|
127
|
-
/** `r` */ r: 114,
|
|
128
|
-
/** `s` */ s: 115,
|
|
129
|
-
/** `t` */ t: 116,
|
|
130
|
-
/** `u` */ u: 117,
|
|
131
|
-
/** `v` */ v: 118,
|
|
132
|
-
/** `w` */ w: 119,
|
|
133
|
-
/** `x` */ x: 120,
|
|
134
|
-
/** `y` */ y: 121,
|
|
135
|
-
/** `z` */ z: 122,
|
|
136
|
-
/** `{` */ LEFT_BRACE: 123,
|
|
137
|
-
/** `|` */ PIPE: 124,
|
|
138
|
-
/** `}` */ RIGHT_BRACE: 125,
|
|
139
|
-
/** `~` */ TILDE: 126,
|
|
140
|
-
});
|