shevchenko 3.1.0-alpha.5 → 3.1.0
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 -0
- package/dist/cjs/anthroponym-declension/anthroponym-inflector.js +1 -1
- package/dist/cjs/anthroponym-declension/bootstrap.js +1 -1
- package/dist/cjs/anthroponym-declension/family-name-classifier/artifacts/model.bundle.json.js +1 -1
- package/dist/cjs/anthroponym-declension/family-name-classifier/cache/incorrect-predictions.json.js +1 -1
- package/dist/cjs/anthroponym-declension/family-name-classifier/family-name-class-transformer.js +1 -1
- package/dist/cjs/anthroponym-declension/family-name-classifier/family-name-classifer.js +1 -1
- package/dist/cjs/anthroponym-declension/family-name-classifier/model-bundle-loader.js +1 -1
- package/dist/cjs/anthroponym-declension/family-name-classifier/model-config.js +1 -1
- package/dist/cjs/anthroponym-declension/family-name-classifier/word-transformer.js +1 -1
- package/dist/cjs/anthroponym-declension/family-name-inflector.js +1 -1
- package/dist/cjs/anthroponym-declension/given-name-inflector.js +1 -1
- package/dist/cjs/anthroponym-declension/name-inflector.js +1 -1
- package/dist/cjs/anthroponym-declension/patronymic-name-inflector.js +1 -1
- package/dist/cjs/extension.js +9 -1
- package/dist/cjs/gender-detection/detect-gender.js +1 -1
- package/dist/cjs/gender-detection/given-names-genders.json.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/input-validation.js +27 -41
- package/dist/cjs/language/alphabet.js +1 -1
- package/dist/cjs/language/grammatical-case.js +1 -1
- package/dist/cjs/language/grammatical-gender.js +1 -1
- package/dist/cjs/language/letter-case.js +1 -1
- package/dist/cjs/language/linguistics.js +1 -1
- package/dist/cjs/language/word-class.js +1 -1
- package/dist/cjs/shevchenko.js +1 -1
- package/dist/cjs/word-declension/append-command-runner.js +1 -1
- package/dist/cjs/word-declension/bootstrap.js +1 -1
- package/dist/cjs/word-declension/command-runner-factory.js +1 -1
- package/dist/cjs/word-declension/declension-rule-inflector.js +1 -1
- package/dist/cjs/word-declension/declension-types.js +1 -1
- package/dist/cjs/word-declension/replace-command-runner.js +1 -1
- package/dist/cjs/word-declension/rules/artifacts/declension-rules.json.js +1 -1
- package/dist/cjs/word-declension/word-inflector.js +1 -1
- package/dist/es/anthroponym-declension/anthroponym-inflector.js +1 -1
- package/dist/es/anthroponym-declension/bootstrap.js +1 -1
- package/dist/es/anthroponym-declension/family-name-classifier/artifacts/model.bundle.json.js +1 -1
- package/dist/es/anthroponym-declension/family-name-classifier/cache/incorrect-predictions.json.js +1 -1
- package/dist/es/anthroponym-declension/family-name-classifier/family-name-class-transformer.js +1 -1
- package/dist/es/anthroponym-declension/family-name-classifier/family-name-classifer.js +1 -1
- package/dist/es/anthroponym-declension/family-name-classifier/model-bundle-loader.js +1 -1
- package/dist/es/anthroponym-declension/family-name-classifier/model-config.js +1 -1
- package/dist/es/anthroponym-declension/family-name-classifier/word-transformer.js +1 -1
- package/dist/es/anthroponym-declension/family-name-inflector.js +1 -1
- package/dist/es/anthroponym-declension/given-name-inflector.js +1 -1
- package/dist/es/anthroponym-declension/name-inflector.js +1 -1
- package/dist/es/anthroponym-declension/patronymic-name-inflector.js +1 -1
- package/dist/es/extension.d.ts +2 -2
- package/dist/es/extension.js +9 -2
- package/dist/es/gender-detection/detect-gender.js +1 -1
- package/dist/es/gender-detection/given-names-genders.json.js +1 -1
- package/dist/es/index.js +1 -1
- package/dist/es/input-validation.d.ts +2 -2
- package/dist/es/input-validation.js +27 -41
- package/dist/es/language/alphabet.js +1 -1
- package/dist/es/language/grammatical-case.js +1 -1
- package/dist/es/language/grammatical-gender.js +1 -1
- package/dist/es/language/letter-case.js +1 -1
- package/dist/es/language/linguistics.js +1 -1
- package/dist/es/language/word-class.js +1 -1
- package/dist/es/shevchenko.js +1 -1
- package/dist/es/word-declension/append-command-runner.js +1 -1
- package/dist/es/word-declension/bootstrap.js +1 -1
- package/dist/es/word-declension/command-runner-factory.js +1 -1
- package/dist/es/word-declension/declension-rule-inflector.js +1 -1
- package/dist/es/word-declension/declension-types.js +1 -1
- package/dist/es/word-declension/replace-command-runner.js +1 -1
- package/dist/es/word-declension/rules/artifacts/declension-rules.json.js +1 -1
- package/dist/es/word-declension/word-inflector.js +1 -1
- package/dist/umd/shevchenko.min.js +89 -89
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -10,6 +10,10 @@ JavaScript library for declension of Ukrainian anthroponyms.
|
|
|
10
10
|
* [License](https://github.com/tooleks/shevchenko-js/blob/main/LICENSE)
|
|
11
11
|
* [Migration Guide (v2 → v3)](https://github.com/tooleks/shevchenko-js/wiki/Migration-Guide)
|
|
12
12
|
|
|
13
|
+
## Extensions
|
|
14
|
+
|
|
15
|
+
* [Military extension](https://github.com/tooleks/shevchenko-ext-military) - declension of Ukrainian military ranks and appointments
|
|
16
|
+
|
|
13
17
|
## User Guide
|
|
14
18
|
|
|
15
19
|
### Installation
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file JavaScript library for declension of Ukrainian anthroponyms
|
|
3
3
|
* @module shevchenko
|
|
4
|
-
* @version 3.1.0
|
|
4
|
+
* @version 3.1.0
|
|
5
5
|
* @author Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
6
6
|
* @license MIT
|
|
7
7
|
* @copyright 2017-2024 Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file JavaScript library for declension of Ukrainian anthroponyms
|
|
3
3
|
* @module shevchenko
|
|
4
|
-
* @version 3.1.0
|
|
4
|
+
* @version 3.1.0
|
|
5
5
|
* @author Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
6
6
|
* @license MIT
|
|
7
7
|
* @copyright 2017-2024 Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
package/dist/cjs/anthroponym-declension/family-name-classifier/artifacts/model.bundle.json.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file JavaScript library for declension of Ukrainian anthroponyms
|
|
3
3
|
* @module shevchenko
|
|
4
|
-
* @version 3.1.0
|
|
4
|
+
* @version 3.1.0
|
|
5
5
|
* @author Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
6
6
|
* @license MIT
|
|
7
7
|
* @copyright 2017-2024 Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
package/dist/cjs/anthroponym-declension/family-name-classifier/cache/incorrect-predictions.json.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file JavaScript library for declension of Ukrainian anthroponyms
|
|
3
3
|
* @module shevchenko
|
|
4
|
-
* @version 3.1.0
|
|
4
|
+
* @version 3.1.0
|
|
5
5
|
* @author Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
6
6
|
* @license MIT
|
|
7
7
|
* @copyright 2017-2024 Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
package/dist/cjs/anthroponym-declension/family-name-classifier/family-name-class-transformer.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file JavaScript library for declension of Ukrainian anthroponyms
|
|
3
3
|
* @module shevchenko
|
|
4
|
-
* @version 3.1.0
|
|
4
|
+
* @version 3.1.0
|
|
5
5
|
* @author Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
6
6
|
* @license MIT
|
|
7
7
|
* @copyright 2017-2024 Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file JavaScript library for declension of Ukrainian anthroponyms
|
|
3
3
|
* @module shevchenko
|
|
4
|
-
* @version 3.1.0
|
|
4
|
+
* @version 3.1.0
|
|
5
5
|
* @author Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
6
6
|
* @license MIT
|
|
7
7
|
* @copyright 2017-2024 Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file JavaScript library for declension of Ukrainian anthroponyms
|
|
3
3
|
* @module shevchenko
|
|
4
|
-
* @version 3.1.0
|
|
4
|
+
* @version 3.1.0
|
|
5
5
|
* @author Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
6
6
|
* @license MIT
|
|
7
7
|
* @copyright 2017-2024 Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file JavaScript library for declension of Ukrainian anthroponyms
|
|
3
3
|
* @module shevchenko
|
|
4
|
-
* @version 3.1.0
|
|
4
|
+
* @version 3.1.0
|
|
5
5
|
* @author Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
6
6
|
* @license MIT
|
|
7
7
|
* @copyright 2017-2024 Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file JavaScript library for declension of Ukrainian anthroponyms
|
|
3
3
|
* @module shevchenko
|
|
4
|
-
* @version 3.1.0
|
|
4
|
+
* @version 3.1.0
|
|
5
5
|
* @author Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
6
6
|
* @license MIT
|
|
7
7
|
* @copyright 2017-2024 Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file JavaScript library for declension of Ukrainian anthroponyms
|
|
3
3
|
* @module shevchenko
|
|
4
|
-
* @version 3.1.0
|
|
4
|
+
* @version 3.1.0
|
|
5
5
|
* @author Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
6
6
|
* @license MIT
|
|
7
7
|
* @copyright 2017-2024 Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file JavaScript library for declension of Ukrainian anthroponyms
|
|
3
3
|
* @module shevchenko
|
|
4
|
-
* @version 3.1.0
|
|
4
|
+
* @version 3.1.0
|
|
5
5
|
* @author Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
6
6
|
* @license MIT
|
|
7
7
|
* @copyright 2017-2024 Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file JavaScript library for declension of Ukrainian anthroponyms
|
|
3
3
|
* @module shevchenko
|
|
4
|
-
* @version 3.1.0
|
|
4
|
+
* @version 3.1.0
|
|
5
5
|
* @author Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
6
6
|
* @license MIT
|
|
7
7
|
* @copyright 2017-2024 Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file JavaScript library for declension of Ukrainian anthroponyms
|
|
3
3
|
* @module shevchenko
|
|
4
|
-
* @version 3.1.0
|
|
4
|
+
* @version 3.1.0
|
|
5
5
|
* @author Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
6
6
|
* @license MIT
|
|
7
7
|
* @copyright 2017-2024 Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
package/dist/cjs/extension.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file JavaScript library for declension of Ukrainian anthroponyms
|
|
3
3
|
* @module shevchenko
|
|
4
|
-
* @version 3.1.0
|
|
4
|
+
* @version 3.1.0
|
|
5
5
|
* @author Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
6
6
|
* @license MIT
|
|
7
7
|
* @copyright 2017-2024 Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
@@ -18,6 +18,13 @@ function registerExtension(extensionFactory) {
|
|
|
18
18
|
const extension = extensionFactory({ wordInflector: bootstrap.wordInflector });
|
|
19
19
|
registeredExtensions.push(extension);
|
|
20
20
|
}
|
|
21
|
+
function getCustomFieldNames() {
|
|
22
|
+
const fieldNames = [];
|
|
23
|
+
for (const extension of registeredExtensions) {
|
|
24
|
+
fieldNames.push(...extension.fieldNames);
|
|
25
|
+
}
|
|
26
|
+
return fieldNames;
|
|
27
|
+
}
|
|
21
28
|
async function afterInflect(grammaticalCase, input) {
|
|
22
29
|
var _a;
|
|
23
30
|
const output = {};
|
|
@@ -31,4 +38,5 @@ async function afterInflect(grammaticalCase, input) {
|
|
|
31
38
|
}
|
|
32
39
|
|
|
33
40
|
exports.afterInflect = afterInflect;
|
|
41
|
+
exports.getCustomFieldNames = getCustomFieldNames;
|
|
34
42
|
exports.registerExtension = registerExtension;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file JavaScript library for declension of Ukrainian anthroponyms
|
|
3
3
|
* @module shevchenko
|
|
4
|
-
* @version 3.1.0
|
|
4
|
+
* @version 3.1.0
|
|
5
5
|
* @author Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
6
6
|
* @license MIT
|
|
7
7
|
* @copyright 2017-2024 Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file JavaScript library for declension of Ukrainian anthroponyms
|
|
3
3
|
* @module shevchenko
|
|
4
|
-
* @version 3.1.0
|
|
4
|
+
* @version 3.1.0
|
|
5
5
|
* @author Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
6
6
|
* @license MIT
|
|
7
7
|
* @copyright 2017-2024 Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file JavaScript library for declension of Ukrainian anthroponyms
|
|
3
3
|
* @module shevchenko
|
|
4
|
-
* @version 3.1.0
|
|
4
|
+
* @version 3.1.0
|
|
5
5
|
* @author Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
6
6
|
* @license MIT
|
|
7
7
|
* @copyright 2017-2024 Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file JavaScript library for declension of Ukrainian anthroponyms
|
|
3
3
|
* @module shevchenko
|
|
4
|
-
* @version 3.1.0
|
|
4
|
+
* @version 3.1.0
|
|
5
5
|
* @author Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
6
6
|
* @license MIT
|
|
7
7
|
* @copyright 2017-2024 Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
13
13
|
|
|
14
|
+
var extension = require('./extension.js');
|
|
14
15
|
require('./language/alphabet.js');
|
|
15
16
|
require('./language/word-class.js');
|
|
16
17
|
require('./language/grammatical-case.js');
|
|
@@ -18,31 +19,30 @@ var grammaticalGender = require('./language/grammatical-gender.js');
|
|
|
18
19
|
|
|
19
20
|
class InputValidationError extends TypeError {
|
|
20
21
|
}
|
|
22
|
+
const fieldNames = ['givenName', 'patronymicName', 'familyName'];
|
|
21
23
|
/**
|
|
22
24
|
* Validates if a given value is a valid input for declension.
|
|
23
25
|
*
|
|
24
26
|
* @throws {InputValidationError}
|
|
25
27
|
*/
|
|
26
|
-
function validateDeclensionInput(
|
|
27
|
-
if (!isObject(
|
|
28
|
+
function validateDeclensionInput(input) {
|
|
29
|
+
if (!isObject(input)) {
|
|
28
30
|
throw new InputValidationError('The input type must be an object.');
|
|
29
31
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
const isGenderValid = Object.values(grammaticalGender.GrammaticalGender).includes(input.gender);
|
|
33
|
+
if (!isGenderValid) {
|
|
34
|
+
throw new InputValidationError(`The "gender" parameter must be one of the following:` +
|
|
35
|
+
` "${Object.values(grammaticalGender.GrammaticalGender).join('", "')}".`);
|
|
32
36
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
throw new InputValidationError(
|
|
37
|
+
const mergedFieldNames = [...fieldNames, ...extension.getCustomFieldNames()];
|
|
38
|
+
const hasFields = mergedFieldNames.some((fieldName) => fieldName in input && typeof input[fieldName] !== 'undefined');
|
|
39
|
+
if (!hasFields) {
|
|
40
|
+
throw new InputValidationError(`At least one of the following parameters must present: "${mergedFieldNames.join('", "')}".`);
|
|
37
41
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
throw new InputValidationError('The "patronymicName" parameter must be a string.');
|
|
43
|
-
}
|
|
44
|
-
if (isDefined(value.familyName) && !isString(value.familyName)) {
|
|
45
|
-
throw new InputValidationError('The "familyName" parameter must be a string.');
|
|
42
|
+
for (const fieldName of mergedFieldNames) {
|
|
43
|
+
if (typeof input[fieldName] !== 'undefined' && typeof input[fieldName] !== 'string') {
|
|
44
|
+
throw new InputValidationError(`The "${fieldName}" parameter must be a string.`);
|
|
45
|
+
}
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
/**
|
|
@@ -50,36 +50,22 @@ function validateDeclensionInput(value) {
|
|
|
50
50
|
*
|
|
51
51
|
* @throws {InputValidationError}
|
|
52
52
|
*/
|
|
53
|
-
function validateGenderDetectionInput(
|
|
54
|
-
if (!isObject(
|
|
53
|
+
function validateGenderDetectionInput(input) {
|
|
54
|
+
if (!isObject(input)) {
|
|
55
55
|
throw new InputValidationError('The input type must be an object.');
|
|
56
56
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
throw new InputValidationError('At least one of the following parameters must present: "givenName", "patronymicName", "familyName".');
|
|
61
|
-
}
|
|
62
|
-
if (isDefined(value.givenName) && !isString(value.givenName)) {
|
|
63
|
-
throw new InputValidationError('The "givenName" parameter must be a string.');
|
|
64
|
-
}
|
|
65
|
-
if (isDefined(value.patronymicName) && !isString(value.patronymicName)) {
|
|
66
|
-
throw new InputValidationError('The "patronymicName" parameter must be a string.');
|
|
57
|
+
const hasFields = fieldNames.some((fieldName) => fieldName in input && typeof input[fieldName] !== 'undefined');
|
|
58
|
+
if (!hasFields) {
|
|
59
|
+
throw new InputValidationError(`At least one of the following parameters must present: "${fieldNames.join('", "')}".`);
|
|
67
60
|
}
|
|
68
|
-
|
|
69
|
-
|
|
61
|
+
for (const fieldName of fieldNames) {
|
|
62
|
+
if (typeof input[fieldName] !== 'undefined' && typeof input[fieldName] !== 'string') {
|
|
63
|
+
throw new InputValidationError(`The "${fieldName}" parameter must be a string.`);
|
|
64
|
+
}
|
|
70
65
|
}
|
|
71
66
|
}
|
|
72
|
-
function isDefined(value) {
|
|
73
|
-
return typeof value !== 'undefined';
|
|
74
|
-
}
|
|
75
67
|
function isObject(value) {
|
|
76
|
-
return value
|
|
77
|
-
}
|
|
78
|
-
function isString(value) {
|
|
79
|
-
return typeof value === 'string';
|
|
80
|
-
}
|
|
81
|
-
function isIn(value, values) {
|
|
82
|
-
return values.includes(value);
|
|
68
|
+
return typeof value === 'object' && value != null;
|
|
83
69
|
}
|
|
84
70
|
|
|
85
71
|
exports.InputValidationError = InputValidationError;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file JavaScript library for declension of Ukrainian anthroponyms
|
|
3
3
|
* @module shevchenko
|
|
4
|
-
* @version 3.1.0
|
|
4
|
+
* @version 3.1.0
|
|
5
5
|
* @author Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
6
6
|
* @license MIT
|
|
7
7
|
* @copyright 2017-2024 Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file JavaScript library for declension of Ukrainian anthroponyms
|
|
3
3
|
* @module shevchenko
|
|
4
|
-
* @version 3.1.0
|
|
4
|
+
* @version 3.1.0
|
|
5
5
|
* @author Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
6
6
|
* @license MIT
|
|
7
7
|
* @copyright 2017-2024 Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file JavaScript library for declension of Ukrainian anthroponyms
|
|
3
3
|
* @module shevchenko
|
|
4
|
-
* @version 3.1.0
|
|
4
|
+
* @version 3.1.0
|
|
5
5
|
* @author Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
6
6
|
* @license MIT
|
|
7
7
|
* @copyright 2017-2024 Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file JavaScript library for declension of Ukrainian anthroponyms
|
|
3
3
|
* @module shevchenko
|
|
4
|
-
* @version 3.1.0
|
|
4
|
+
* @version 3.1.0
|
|
5
5
|
* @author Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
6
6
|
* @license MIT
|
|
7
7
|
* @copyright 2017-2024 Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file JavaScript library for declension of Ukrainian anthroponyms
|
|
3
3
|
* @module shevchenko
|
|
4
|
-
* @version 3.1.0
|
|
4
|
+
* @version 3.1.0
|
|
5
5
|
* @author Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
6
6
|
* @license MIT
|
|
7
7
|
* @copyright 2017-2024 Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file JavaScript library for declension of Ukrainian anthroponyms
|
|
3
3
|
* @module shevchenko
|
|
4
|
-
* @version 3.1.0
|
|
4
|
+
* @version 3.1.0
|
|
5
5
|
* @author Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
6
6
|
* @license MIT
|
|
7
7
|
* @copyright 2017-2024 Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
package/dist/cjs/shevchenko.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file JavaScript library for declension of Ukrainian anthroponyms
|
|
3
3
|
* @module shevchenko
|
|
4
|
-
* @version 3.1.0
|
|
4
|
+
* @version 3.1.0
|
|
5
5
|
* @author Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
6
6
|
* @license MIT
|
|
7
7
|
* @copyright 2017-2024 Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file JavaScript library for declension of Ukrainian anthroponyms
|
|
3
3
|
* @module shevchenko
|
|
4
|
-
* @version 3.1.0
|
|
4
|
+
* @version 3.1.0
|
|
5
5
|
* @author Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
6
6
|
* @license MIT
|
|
7
7
|
* @copyright 2017-2024 Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file JavaScript library for declension of Ukrainian anthroponyms
|
|
3
3
|
* @module shevchenko
|
|
4
|
-
* @version 3.1.0
|
|
4
|
+
* @version 3.1.0
|
|
5
5
|
* @author Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
6
6
|
* @license MIT
|
|
7
7
|
* @copyright 2017-2024 Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file JavaScript library for declension of Ukrainian anthroponyms
|
|
3
3
|
* @module shevchenko
|
|
4
|
-
* @version 3.1.0
|
|
4
|
+
* @version 3.1.0
|
|
5
5
|
* @author Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
6
6
|
* @license MIT
|
|
7
7
|
* @copyright 2017-2024 Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file JavaScript library for declension of Ukrainian anthroponyms
|
|
3
3
|
* @module shevchenko
|
|
4
|
-
* @version 3.1.0
|
|
4
|
+
* @version 3.1.0
|
|
5
5
|
* @author Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
6
6
|
* @license MIT
|
|
7
7
|
* @copyright 2017-2024 Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file JavaScript library for declension of Ukrainian anthroponyms
|
|
3
3
|
* @module shevchenko
|
|
4
|
-
* @version 3.1.0
|
|
4
|
+
* @version 3.1.0
|
|
5
5
|
* @author Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
6
6
|
* @license MIT
|
|
7
7
|
* @copyright 2017-2024 Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file JavaScript library for declension of Ukrainian anthroponyms
|
|
3
3
|
* @module shevchenko
|
|
4
|
-
* @version 3.1.0
|
|
4
|
+
* @version 3.1.0
|
|
5
5
|
* @author Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
6
6
|
* @license MIT
|
|
7
7
|
* @copyright 2017-2024 Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file JavaScript library for declension of Ukrainian anthroponyms
|
|
3
3
|
* @module shevchenko
|
|
4
|
-
* @version 3.1.0
|
|
4
|
+
* @version 3.1.0
|
|
5
5
|
* @author Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
6
6
|
* @license MIT
|
|
7
7
|
* @copyright 2017-2024 Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file JavaScript library for declension of Ukrainian anthroponyms
|
|
3
3
|
* @module shevchenko
|
|
4
|
-
* @version 3.1.0
|
|
4
|
+
* @version 3.1.0
|
|
5
5
|
* @author Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
6
6
|
* @license MIT
|
|
7
7
|
* @copyright 2017-2024 Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file JavaScript library for declension of Ukrainian anthroponyms
|
|
3
3
|
* @module shevchenko
|
|
4
|
-
* @version 3.1.0
|
|
4
|
+
* @version 3.1.0
|
|
5
5
|
* @author Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
6
6
|
* @license MIT
|
|
7
7
|
* @copyright 2017-2024 Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file JavaScript library for declension of Ukrainian anthroponyms
|
|
3
3
|
* @module shevchenko
|
|
4
|
-
* @version 3.1.0
|
|
4
|
+
* @version 3.1.0
|
|
5
5
|
* @author Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
6
6
|
* @license MIT
|
|
7
7
|
* @copyright 2017-2024 Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
package/dist/es/anthroponym-declension/family-name-classifier/artifacts/model.bundle.json.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file JavaScript library for declension of Ukrainian anthroponyms
|
|
3
3
|
* @module shevchenko
|
|
4
|
-
* @version 3.1.0
|
|
4
|
+
* @version 3.1.0
|
|
5
5
|
* @author Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
6
6
|
* @license MIT
|
|
7
7
|
* @copyright 2017-2024 Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
package/dist/es/anthroponym-declension/family-name-classifier/cache/incorrect-predictions.json.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file JavaScript library for declension of Ukrainian anthroponyms
|
|
3
3
|
* @module shevchenko
|
|
4
|
-
* @version 3.1.0
|
|
4
|
+
* @version 3.1.0
|
|
5
5
|
* @author Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
6
6
|
* @license MIT
|
|
7
7
|
* @copyright 2017-2024 Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
package/dist/es/anthroponym-declension/family-name-classifier/family-name-class-transformer.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file JavaScript library for declension of Ukrainian anthroponyms
|
|
3
3
|
* @module shevchenko
|
|
4
|
-
* @version 3.1.0
|
|
4
|
+
* @version 3.1.0
|
|
5
5
|
* @author Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
6
6
|
* @license MIT
|
|
7
7
|
* @copyright 2017-2024 Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file JavaScript library for declension of Ukrainian anthroponyms
|
|
3
3
|
* @module shevchenko
|
|
4
|
-
* @version 3.1.0
|
|
4
|
+
* @version 3.1.0
|
|
5
5
|
* @author Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
6
6
|
* @license MIT
|
|
7
7
|
* @copyright 2017-2024 Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file JavaScript library for declension of Ukrainian anthroponyms
|
|
3
3
|
* @module shevchenko
|
|
4
|
-
* @version 3.1.0
|
|
4
|
+
* @version 3.1.0
|
|
5
5
|
* @author Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
6
6
|
* @license MIT
|
|
7
7
|
* @copyright 2017-2024 Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file JavaScript library for declension of Ukrainian anthroponyms
|
|
3
3
|
* @module shevchenko
|
|
4
|
-
* @version 3.1.0
|
|
4
|
+
* @version 3.1.0
|
|
5
5
|
* @author Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
6
6
|
* @license MIT
|
|
7
7
|
* @copyright 2017-2024 Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file JavaScript library for declension of Ukrainian anthroponyms
|
|
3
3
|
* @module shevchenko
|
|
4
|
-
* @version 3.1.0
|
|
4
|
+
* @version 3.1.0
|
|
5
5
|
* @author Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
6
6
|
* @license MIT
|
|
7
7
|
* @copyright 2017-2024 Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file JavaScript library for declension of Ukrainian anthroponyms
|
|
3
3
|
* @module shevchenko
|
|
4
|
-
* @version 3.1.0
|
|
4
|
+
* @version 3.1.0
|
|
5
5
|
* @author Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
6
6
|
* @license MIT
|
|
7
7
|
* @copyright 2017-2024 Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file JavaScript library for declension of Ukrainian anthroponyms
|
|
3
3
|
* @module shevchenko
|
|
4
|
-
* @version 3.1.0
|
|
4
|
+
* @version 3.1.0
|
|
5
5
|
* @author Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
6
6
|
* @license MIT
|
|
7
7
|
* @copyright 2017-2024 Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file JavaScript library for declension of Ukrainian anthroponyms
|
|
3
3
|
* @module shevchenko
|
|
4
|
-
* @version 3.1.0
|
|
4
|
+
* @version 3.1.0
|
|
5
5
|
* @author Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
6
6
|
* @license MIT
|
|
7
7
|
* @copyright 2017-2024 Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file JavaScript library for declension of Ukrainian anthroponyms
|
|
3
3
|
* @module shevchenko
|
|
4
|
-
* @version 3.1.0
|
|
4
|
+
* @version 3.1.0
|
|
5
5
|
* @author Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
|
6
6
|
* @license MIT
|
|
7
7
|
* @copyright 2017-2024 Oleksandr Tolochko <shevchenko-js@tooleks.com>
|
package/dist/es/extension.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DeclensionInput, DeclensionOutput } from './contracts';
|
|
2
2
|
import { GrammaticalCase } from './language';
|
|
3
3
|
import { WordInflector } from './word-declension';
|
|
4
|
-
type FieldName = keyof Omit<DeclensionInput, 'gender'>;
|
|
4
|
+
export type FieldName = keyof Omit<DeclensionInput, 'gender'>;
|
|
5
5
|
export type AfterInflectHook = <T extends DeclensionInput>(grammaticalCase: GrammaticalCase, input: T) => Promise<DeclensionOutput<T>>;
|
|
6
6
|
export type ShevchenkoExtension = {
|
|
7
7
|
fieldNames: FieldName[];
|
|
@@ -12,5 +12,5 @@ export type ExtensionContext = {
|
|
|
12
12
|
wordInflector: WordInflector;
|
|
13
13
|
};
|
|
14
14
|
export declare function registerExtension(extensionFactory: ExtensionFactory): void;
|
|
15
|
+
export declare function getCustomFieldNames(): FieldName[];
|
|
15
16
|
export declare function afterInflect<T extends DeclensionInput>(grammaticalCase: GrammaticalCase, input: T): Promise<DeclensionOutput<T>>;
|
|
16
|
-
export {};
|