taraskevizer 1.1.1 → 1.1.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/dist/index.d.ts +5 -2
- package/dist/index.js +3 -0
- package/dist/index.mjs +3 -0
- package/package.json +1 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
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;
|
|
1
5
|
type Alphabet = 0 | 1 | 2;
|
|
2
6
|
type J = 0 | 1 | 2;
|
|
3
7
|
type HtmlOptions = {
|
|
@@ -8,8 +12,7 @@ type TaraskOptions = {
|
|
|
8
12
|
j: J;
|
|
9
13
|
html: false | HtmlOptions;
|
|
10
14
|
};
|
|
11
|
-
type
|
|
12
|
-
type Tarask = (text: string, options?: TaraskOptions) => string;
|
|
15
|
+
type Tarask = (text: string, options?: DeepPartial<TaraskOptions>) => string;
|
|
13
16
|
type TaraskAsync = Promisify<Tarask>;
|
|
14
17
|
type Dict = Record<string, RegExp>;
|
|
15
18
|
type AlphabetDependentDict = {
|
package/dist/index.js
CHANGED
|
@@ -1997,6 +1997,9 @@ var additionalReplacements = {
|
|
|
1997
1997
|
};
|
|
1998
1998
|
var taraskSync = (text, options) => {
|
|
1999
1999
|
const { abc = 0, j = 0, html = false } = options || {};
|
|
2000
|
+
if (typeof html === "object") {
|
|
2001
|
+
html.g || (html.g = false);
|
|
2002
|
+
}
|
|
2000
2003
|
const noFix = [];
|
|
2001
2004
|
const LEFT_ANGLE_BRACKET = html ? "<" : "<";
|
|
2002
2005
|
text = ` ${text.trim()} `.replace(/<([,.]?)((?:.|\s)*?)>/g, ($0, $1, $2) => {
|
package/dist/index.mjs
CHANGED
|
@@ -1970,6 +1970,9 @@ var additionalReplacements = {
|
|
|
1970
1970
|
};
|
|
1971
1971
|
var taraskSync = (text, options) => {
|
|
1972
1972
|
const { abc = 0, j = 0, html = false } = options || {};
|
|
1973
|
+
if (typeof html === "object") {
|
|
1974
|
+
html.g || (html.g = false);
|
|
1975
|
+
}
|
|
1973
1976
|
const noFix = [];
|
|
1974
1977
|
const LEFT_ANGLE_BRACKET = html ? "<" : "<";
|
|
1975
1978
|
text = ` ${text.trim()} `.replace(/<([,.]?)((?:.|\s)*?)>/g, ($0, $1, $2) => {
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "taraskevizer",
|
|
3
3
|
"author": "GooseOb",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "1.1.
|
|
5
|
+
"version": "1.1.2",
|
|
6
6
|
"private": false,
|
|
7
7
|
"homepage": "https://gooseob.github.io/taraskevizatar/",
|
|
8
8
|
"main": "dist/index.js",
|
|
@@ -30,7 +30,6 @@
|
|
|
30
30
|
"belarusian"
|
|
31
31
|
],
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@digitak/esrun": "^3.2.24",
|
|
34
33
|
"husky": "^8.0.3",
|
|
35
34
|
"prettier": "^3.0.0",
|
|
36
35
|
"tsup": "^6.5.0",
|