taraskevizer 1.2.1 → 1.2.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.
- package/README.md +4 -3
- package/dist/index.d.ts +32 -32
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -169,7 +169,7 @@ $ npm i -g taraskevizer
|
|
|
169
169
|
## Usage
|
|
170
170
|
|
|
171
171
|
```bash
|
|
172
|
-
$
|
|
172
|
+
$ tarask "планета"
|
|
173
173
|
```
|
|
174
174
|
|
|
175
175
|
## Options
|
|
@@ -178,14 +178,15 @@ $ taraskevize "планета"
|
|
|
178
178
|
# Alpabet
|
|
179
179
|
--latin (-l)
|
|
180
180
|
--arabic (-a)
|
|
181
|
-
# When to replace і by й after vowels
|
|
181
|
+
# When to replace і(i) by й(j) after vowels
|
|
182
182
|
--jrandom (-jr)
|
|
183
183
|
--jalways (-ja)
|
|
184
|
-
#
|
|
184
|
+
# Replace ґ(g) by г(h) in cyrillic alphabet
|
|
185
185
|
--h (-h)
|
|
186
186
|
# Variations
|
|
187
187
|
--no-variations (-nv)
|
|
188
188
|
--first-variation-only (-fvo)
|
|
189
189
|
# Other
|
|
190
190
|
--no-color (-nc)
|
|
191
|
+
--html (-html) # options except alphabet and j will be ignored
|
|
191
192
|
```
|
package/dist/index.d.ts
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
type Promisify<T> = T extends (...args: infer TArgs) => infer TReturn ? (...args: TArgs) => Promise<TReturn> : never;
|
|
2
|
-
type DeepPartial<T> = T extends object ? {
|
|
3
|
-
[P in keyof T]?: DeepPartial<T[P]>;
|
|
4
|
-
} : T;
|
|
5
|
-
type Alphabet = 0 | 1 | 2;
|
|
6
|
-
type J = 0 | 1 | 2;
|
|
7
|
-
type Variation = 0 | 1 | 2;
|
|
8
|
-
type NonHtmlOptions = {
|
|
9
|
-
nodeColors: boolean;
|
|
10
|
-
h: boolean;
|
|
11
|
-
variations: Variation;
|
|
12
|
-
};
|
|
13
|
-
type HtmlOptions = {
|
|
14
|
-
g: boolean;
|
|
15
|
-
};
|
|
16
|
-
type TaraskOptions = DeepPartial<{
|
|
17
|
-
abc: Alphabet;
|
|
18
|
-
j: J;
|
|
19
|
-
html: false | HtmlOptions;
|
|
20
|
-
nonHtml: false | NonHtmlOptions;
|
|
21
|
-
}>;
|
|
22
|
-
type Tarask = (text: string, options?: TaraskOptions) => string;
|
|
23
|
-
type TaraskAsync = Promisify<Tarask>;
|
|
24
|
-
type Dict<T = RegExp> = [string, T][];
|
|
25
|
-
type AlphabetDependentDict = {
|
|
26
|
-
[key in Alphabet]?: Dict;
|
|
1
|
+
type Promisify<T> = T extends (...args: infer TArgs) => infer TReturn ? (...args: TArgs) => Promise<TReturn> : never;
|
|
2
|
+
type DeepPartial<T> = T extends object ? {
|
|
3
|
+
[P in keyof T]?: DeepPartial<T[P]>;
|
|
4
|
+
} : T;
|
|
5
|
+
type Alphabet = 0 | 1 | 2;
|
|
6
|
+
type J = 0 | 1 | 2;
|
|
7
|
+
type Variation = 0 | 1 | 2;
|
|
8
|
+
type NonHtmlOptions = {
|
|
9
|
+
nodeColors: boolean;
|
|
10
|
+
h: boolean;
|
|
11
|
+
variations: Variation;
|
|
12
|
+
};
|
|
13
|
+
type HtmlOptions = {
|
|
14
|
+
g: boolean;
|
|
15
|
+
};
|
|
16
|
+
type TaraskOptions = DeepPartial<{
|
|
17
|
+
abc: Alphabet;
|
|
18
|
+
j: J;
|
|
19
|
+
html: false | HtmlOptions;
|
|
20
|
+
nonHtml: false | NonHtmlOptions;
|
|
21
|
+
}>;
|
|
22
|
+
type Tarask = (text: string, options?: TaraskOptions) => string;
|
|
23
|
+
type TaraskAsync = Promisify<Tarask>;
|
|
24
|
+
type Dict<T = RegExp> = [string, T][];
|
|
25
|
+
type AlphabetDependentDict = {
|
|
26
|
+
[key in Alphabet]?: Dict;
|
|
27
27
|
};
|
|
28
28
|
|
|
29
|
-
declare const taraskSync: Tarask;
|
|
29
|
+
declare const taraskSync: Tarask;
|
|
30
30
|
declare const tarask: TaraskAsync;
|
|
31
31
|
|
|
32
|
-
declare const gobj: {
|
|
33
|
-
readonly г: "ґ";
|
|
34
|
-
readonly Г: "Ґ";
|
|
35
|
-
readonly ґ: "г";
|
|
36
|
-
readonly Ґ: "Г";
|
|
32
|
+
declare const gobj: {
|
|
33
|
+
readonly г: "ґ";
|
|
34
|
+
readonly Г: "Ґ";
|
|
35
|
+
readonly ґ: "г";
|
|
36
|
+
readonly Ґ: "Г";
|
|
37
37
|
};
|
|
38
38
|
|
|
39
39
|
export { AlphabetDependentDict, Dict, HtmlOptions, NonHtmlOptions, Tarask, TaraskAsync, TaraskOptions, gobj, tarask, taraskSync };
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "taraskevizer",
|
|
3
3
|
"author": "GooseOb",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "1.2.
|
|
5
|
+
"version": "1.2.2",
|
|
6
6
|
"private": false,
|
|
7
7
|
"homepage": "https://gooseob.github.io/taraskevizatar/",
|
|
8
8
|
"main": "dist/index.js",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"types": "dist/index.d.ts",
|
|
11
11
|
"type": "module",
|
|
12
12
|
"bin": {
|
|
13
|
-
"
|
|
13
|
+
"tarask": "./bin/index.js"
|
|
14
14
|
},
|
|
15
15
|
"files": [
|
|
16
16
|
"dist/**/*",
|