@fgv/ts-bcp47 4.0.2 → 4.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/CHANGELOG.json +18 -0
- package/CHANGELOG.md +13 -1
- package/dist/tsdoc-metadata.json +1 -1
- package/lib/index.js +17 -7
- package/lib/index.js.map +1 -1
- package/lib/packlets/bcp47/bcp47Subtags/converters.js +17 -7
- package/lib/packlets/bcp47/bcp47Subtags/converters.js.map +1 -1
- package/lib/packlets/bcp47/bcp47Subtags/index.js +17 -7
- package/lib/packlets/bcp47/bcp47Subtags/index.js.map +1 -1
- package/lib/packlets/bcp47/bcp47Subtags/validate.js +17 -7
- package/lib/packlets/bcp47/bcp47Subtags/validate.js.map +1 -1
- package/lib/packlets/bcp47/common.js +2 -2
- package/lib/packlets/bcp47/common.js.map +1 -1
- package/lib/packlets/bcp47/helpers.js +4 -5
- package/lib/packlets/bcp47/helpers.js.map +1 -1
- package/lib/packlets/bcp47/index.js +17 -7
- package/lib/packlets/bcp47/index.js.map +1 -1
- package/lib/packlets/bcp47/languageTag.js +17 -7
- package/lib/packlets/bcp47/languageTag.js.map +1 -1
- package/lib/packlets/bcp47/languageTagParser.js +17 -7
- package/lib/packlets/bcp47/languageTagParser.js.map +1 -1
- package/lib/packlets/bcp47/match/similarity.js +17 -7
- package/lib/packlets/bcp47/match/similarity.js.map +1 -1
- package/lib/packlets/bcp47/normalization/baseNormalizer.js +17 -7
- package/lib/packlets/bcp47/normalization/baseNormalizer.js.map +1 -1
- package/lib/packlets/bcp47/normalization/canonicalNormalizer.js +17 -7
- package/lib/packlets/bcp47/normalization/canonicalNormalizer.js.map +1 -1
- package/lib/packlets/bcp47/normalization/common.js +2 -3
- package/lib/packlets/bcp47/normalization/common.js.map +1 -1
- package/lib/packlets/bcp47/normalization/preferredTagNormalizer.js +17 -7
- package/lib/packlets/bcp47/normalization/preferredTagNormalizer.js.map +1 -1
- package/lib/packlets/bcp47/overrides/converters.js +19 -9
- package/lib/packlets/bcp47/overrides/converters.js.map +1 -1
- package/lib/packlets/bcp47/overrides/overridesRegistry.js +17 -7
- package/lib/packlets/bcp47/overrides/overridesRegistry.js.map +1 -1
- package/lib/packlets/bcp47/validation/baseValidator.js +17 -7
- package/lib/packlets/bcp47/validation/baseValidator.js.map +1 -1
- package/lib/packlets/bcp47/validation/common.js +2 -3
- package/lib/packlets/bcp47/validation/common.js.map +1 -1
- package/lib/packlets/bcp47/validation/isCanonical.js +17 -7
- package/lib/packlets/bcp47/validation/isCanonical.js.map +1 -1
- package/lib/packlets/bcp47/validation/isInPreferredForm.js +17 -7
- package/lib/packlets/bcp47/validation/isInPreferredForm.js.map +1 -1
- package/lib/packlets/bcp47/validation/isValid.js +17 -7
- package/lib/packlets/bcp47/validation/isValid.js.map +1 -1
- package/lib/packlets/bcp47/validation/isWellFormed.js +17 -7
- package/lib/packlets/bcp47/validation/isWellFormed.js.map +1 -1
- package/lib/packlets/iana/common/converters.js +19 -9
- package/lib/packlets/iana/common/converters.js.map +1 -1
- package/lib/packlets/iana/common/utils.js +1 -2
- package/lib/packlets/iana/common/utils.js.map +1 -1
- package/lib/packlets/iana/converters.js +17 -7
- package/lib/packlets/iana/converters.js.map +1 -1
- package/lib/packlets/iana/index.js +17 -7
- package/lib/packlets/iana/index.js.map +1 -1
- package/lib/packlets/iana/jar/converters.js +17 -7
- package/lib/packlets/iana/jar/converters.js.map +1 -1
- package/lib/packlets/iana/jar/index.js +17 -7
- package/lib/packlets/iana/jar/index.js.map +1 -1
- package/lib/packlets/iana/jar/jarConverters.js +19 -9
- package/lib/packlets/iana/jar/jarConverters.js.map +1 -1
- package/lib/packlets/iana/jar/language-subtags/converters.js +17 -7
- package/lib/packlets/iana/jar/language-subtags/converters.js.map +1 -1
- package/lib/packlets/iana/jar/language-subtags/index.js +17 -7
- package/lib/packlets/iana/jar/language-subtags/index.js.map +1 -1
- package/lib/packlets/iana/jar/language-subtags/model.js +17 -7
- package/lib/packlets/iana/jar/language-subtags/model.js.map +1 -1
- package/lib/packlets/iana/jar/language-subtags/registry/converters.js +17 -7
- package/lib/packlets/iana/jar/language-subtags/registry/converters.js.map +1 -1
- package/lib/packlets/iana/jar/language-subtags/registry/index.js +17 -7
- package/lib/packlets/iana/jar/language-subtags/registry/index.js.map +1 -1
- package/lib/packlets/iana/jar/language-subtags/tags/converters.js +22 -12
- package/lib/packlets/iana/jar/language-subtags/tags/converters.js.map +1 -1
- package/lib/packlets/iana/jar/language-subtags/tags/index.js +17 -7
- package/lib/packlets/iana/jar/language-subtags/tags/index.js.map +1 -1
- package/lib/packlets/iana/jar/model.js +17 -7
- package/lib/packlets/iana/jar/model.js.map +1 -1
- package/lib/packlets/iana/language-subtags/converters.js +19 -9
- package/lib/packlets/iana/language-subtags/converters.js.map +1 -1
- package/lib/packlets/iana/language-subtags/index.js +17 -7
- package/lib/packlets/iana/language-subtags/index.js.map +1 -1
- package/lib/packlets/iana/language-subtags/jarConverters.js +20 -10
- package/lib/packlets/iana/language-subtags/jarConverters.js.map +1 -1
- package/lib/packlets/iana/language-subtags/subtagRegistry.js +17 -7
- package/lib/packlets/iana/language-subtags/subtagRegistry.js.map +1 -1
- package/lib/packlets/iana/language-tag-extensions/converters.js +19 -9
- package/lib/packlets/iana/language-tag-extensions/converters.js.map +1 -1
- package/lib/packlets/iana/language-tag-extensions/extensionsRegistry.js +17 -7
- package/lib/packlets/iana/language-tag-extensions/extensionsRegistry.js.map +1 -1
- package/lib/packlets/iana/language-tag-extensions/extensionsScope.js +17 -7
- package/lib/packlets/iana/language-tag-extensions/extensionsScope.js.map +1 -1
- package/lib/packlets/iana/language-tag-extensions/index.js +17 -7
- package/lib/packlets/iana/language-tag-extensions/index.js.map +1 -1
- package/lib/packlets/iana/language-tag-extensions/jarConverters.js +3 -3
- package/lib/packlets/iana/language-tag-extensions/jarConverters.js.map +1 -1
- package/lib/packlets/iana/model.js +17 -7
- package/lib/packlets/iana/model.js.map +1 -1
- package/lib/packlets/unsd/csv/converters.js +2 -2
- package/lib/packlets/unsd/csv/converters.js.map +1 -1
- package/lib/packlets/unsd/csv/index.js +17 -7
- package/lib/packlets/unsd/csv/index.js.map +1 -1
- package/lib/packlets/unsd/index.js +17 -7
- package/lib/packlets/unsd/index.js.map +1 -1
- package/lib/packlets/utils/jsonHelpers.js +1 -2
- package/lib/packlets/utils/jsonHelpers.js.map +1 -1
- package/package.json +29 -30
|
@@ -39,13 +39,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
39
39
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
40
40
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
41
41
|
};
|
|
42
|
-
var __importStar = (this && this.__importStar) || function (
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
};
|
|
42
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
43
|
+
var ownKeys = function(o) {
|
|
44
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
45
|
+
var ar = [];
|
|
46
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
47
|
+
return ar;
|
|
48
|
+
};
|
|
49
|
+
return ownKeys(o);
|
|
50
|
+
};
|
|
51
|
+
return function (mod) {
|
|
52
|
+
if (mod && mod.__esModule) return mod;
|
|
53
|
+
var result = {};
|
|
54
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
55
|
+
__setModuleDefault(result, mod);
|
|
56
|
+
return result;
|
|
57
|
+
};
|
|
58
|
+
})();
|
|
49
59
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50
60
|
exports.LanguageSubtags = void 0;
|
|
51
61
|
__exportStar(require("./jarConverters"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"converters.js","sourceRoot":"","sources":["../../../../src/packlets/iana/jar/converters.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG
|
|
1
|
+
{"version":3,"file":"converters.js","sourceRoot":"","sources":["../../../../src/packlets/iana/jar/converters.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,kDAAgC;AAEhC,oFAAsE;AAC7D,0CAAe","sourcesContent":["/*\n * Copyright (c) 2022 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nexport * from './jarConverters';\n\nimport * as LanguageSubtags from './language-subtags/tags/converters';\nexport { LanguageSubtags };\n"]}
|
|
@@ -36,13 +36,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
36
36
|
}) : function(o, v) {
|
|
37
37
|
o["default"] = v;
|
|
38
38
|
});
|
|
39
|
-
var __importStar = (this && this.__importStar) || function (
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
};
|
|
39
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
40
|
+
var ownKeys = function(o) {
|
|
41
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
42
|
+
var ar = [];
|
|
43
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
44
|
+
return ar;
|
|
45
|
+
};
|
|
46
|
+
return ownKeys(o);
|
|
47
|
+
};
|
|
48
|
+
return function (mod) {
|
|
49
|
+
if (mod && mod.__esModule) return mod;
|
|
50
|
+
var result = {};
|
|
51
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
52
|
+
__setModuleDefault(result, mod);
|
|
53
|
+
return result;
|
|
54
|
+
};
|
|
55
|
+
})();
|
|
46
56
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47
57
|
exports.Model = exports.LanguageSubtags = exports.Converters = void 0;
|
|
48
58
|
const Converters = __importStar(require("./converters"));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/packlets/iana/jar/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/packlets/iana/jar/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,yDAA2C;AAIlC,gCAAU;AAHnB,oEAAsD;AAGjC,0CAAe;AAFpC,+CAAiC;AAEK,sBAAK","sourcesContent":["/*\n * Copyright (c) 2022 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport * as Converters from './converters';\nimport * as LanguageSubtags from './language-subtags';\nimport * as Model from './model';\n\nexport { Converters, LanguageSubtags, Model };\n"]}
|
|
@@ -37,15 +37,26 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
37
37
|
}) : function(o, v) {
|
|
38
38
|
o["default"] = v;
|
|
39
39
|
});
|
|
40
|
-
var __importStar = (this && this.__importStar) || function (
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
};
|
|
40
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
41
|
+
var ownKeys = function(o) {
|
|
42
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
43
|
+
var ar = [];
|
|
44
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
45
|
+
return ar;
|
|
46
|
+
};
|
|
47
|
+
return ownKeys(o);
|
|
48
|
+
};
|
|
49
|
+
return function (mod) {
|
|
50
|
+
if (mod && mod.__esModule) return mod;
|
|
51
|
+
var result = {};
|
|
52
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
53
|
+
__setModuleDefault(result, mod);
|
|
54
|
+
return result;
|
|
55
|
+
};
|
|
56
|
+
})();
|
|
47
57
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
-
exports.
|
|
58
|
+
exports.fileDateEntry = void 0;
|
|
59
|
+
exports.datedRegistryFromJarRecords = datedRegistryFromJarRecords;
|
|
49
60
|
const CommonConverters = __importStar(require("../common/converters"));
|
|
50
61
|
const ts_utils_1 = require("@fgv/ts-utils");
|
|
51
62
|
/**
|
|
@@ -82,5 +93,4 @@ function datedRegistryFromJarRecords(entryConverter) {
|
|
|
82
93
|
});
|
|
83
94
|
});
|
|
84
95
|
}
|
|
85
|
-
exports.datedRegistryFromJarRecords = datedRegistryFromJarRecords;
|
|
86
96
|
//# sourceMappingURL=jarConverters.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jarConverters.js","sourceRoot":"","sources":["../../../../src/packlets/iana/jar/jarConverters.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,2CAA2C
|
|
1
|
+
{"version":3,"file":"jarConverters.js","sourceRoot":"","sources":["../../../../src/packlets/iana/jar/jarConverters.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,2CAA2C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwB3C,kEAwBC;AA9CD,uEAAyD;AAEzD,4CAAyF;AAIzF;;;GAGG;AACU,QAAA,aAAa,GAAG,qBAAU,CAAC,YAAY,CAAiB;IACnE,gEAAgE;IAChE,WAAW,EAAE,gBAAgB,CAAC,gBAAgB;CAC/C,CAAC,CAAC;AAEH;;;;;;GAMG;AACH,SAAgB,2BAA2B,CACzC,cAAgC;IAEhC,OAAO,IAAI,qBAAU,CAAC,aAAa,CACjC,CAAC,IAAa,EAAE,MAAwC,EAAE,SAAc,EAA6B,EAAE;QACrG,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;YACrD,OAAO,IAAA,eAAI,EAAC,6CAA6C,CAAC,CAAC;QAC7D,CAAC;QACD,MAAM,SAAS,GAAG,qBAAa,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QACjD,IAAI,SAAS,CAAC,SAAS,EAAE,EAAE,CAAC;YAC1B,OAAO,IAAA,eAAI,EAAC,0CAA0C,SAAS,CAAC,OAAO,GAAG,CAAC,CAAC;QAC9E,CAAC;QAED,MAAM,OAAO,GAAG,qBAAU,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1E,IAAI,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC;YACxB,OAAO,IAAA,eAAI,EAAC,uCAAuC,OAAO,CAAC,OAAO,GAAG,CAAC,CAAC;QACzE,CAAC;QAED,OAAO,IAAA,kBAAO,EAAC;YACb,QAAQ,EAAE,SAAS,CAAC,KAAK,CAAC,WAAW,CAAC;YACtC,OAAO,EAAE,OAAO,CAAC,KAAK;SACvB,CAAC,CAAC;IACL,CAAC,CACF,CAAC;AACJ,CAAC","sourcesContent":["/*\n * Copyright (c) 2022 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n/* eslint-disable @rushstack/typedef-var */\n\nimport * as CommonConverters from '../common/converters';\n\nimport { Conversion, Converter, Converters, Result, fail, succeed } from '@fgv/ts-utils';\nimport { IDatedRegistry } from '../common/model';\nimport { IFileDateEntry } from './jarModel';\n\n/**\n * Converter for the file date record found at the start of a registry file.\n * @public\n */\nexport const fileDateEntry = Converters.strictObject<IFileDateEntry>({\n // eslint-disable-next-line @typescript-eslint/naming-convention\n 'File-Date': CommonConverters.yearMonthDaySpec\n});\n\n/**\n * Helper function which creates a converter that returns a validated {@Link Iana.Model.IDatedRegistry | DatedRegistry}\n * containing entries of supplied template type `T`.\n * @param entryConverter - A `Converter<T>` to validate each entry\n * @returns A new validating `Converter` which yields {@Link Iana.Model.IDatedRegistry | DatedRegistry<T>}\n * @internal\n */\nexport function datedRegistryFromJarRecords<T, TC = unknown>(\n entryConverter: Converter<T, TC>\n): Converter<IDatedRegistry<T>, TC> {\n return new Conversion.BaseConverter<IDatedRegistry<T>, TC>(\n (from: unknown, __self: Converter<IDatedRegistry<T>, TC>, __context?: TC): Result<IDatedRegistry<T>> => {\n if (typeof from === 'string' || !Array.isArray(from)) {\n return fail('JAR dated registry cannot convert non-array');\n }\n const dateEntry = fileDateEntry.convert(from[0]);\n if (dateEntry.isFailure()) {\n return fail(`Error in JAR datedRegistry date entry (${dateEntry.message})`);\n }\n\n const entries = Converters.arrayOf(entryConverter).convert(from.slice(1));\n if (entries.isFailure()) {\n return fail(`Error in JAR datedRegistry entries (${entries.message})`);\n }\n\n return succeed({\n fileDate: dateEntry.value['File-Date'],\n entries: entries.value\n });\n }\n );\n}\n"]}
|
|
@@ -36,13 +36,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
36
36
|
}) : function(o, v) {
|
|
37
37
|
o["default"] = v;
|
|
38
38
|
});
|
|
39
|
-
var __importStar = (this && this.__importStar) || function (
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
};
|
|
39
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
40
|
+
var ownKeys = function(o) {
|
|
41
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
42
|
+
var ar = [];
|
|
43
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
44
|
+
return ar;
|
|
45
|
+
};
|
|
46
|
+
return ownKeys(o);
|
|
47
|
+
};
|
|
48
|
+
return function (mod) {
|
|
49
|
+
if (mod && mod.__esModule) return mod;
|
|
50
|
+
var result = {};
|
|
51
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
52
|
+
__setModuleDefault(result, mod);
|
|
53
|
+
return result;
|
|
54
|
+
};
|
|
55
|
+
})();
|
|
46
56
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47
57
|
exports.Tags = exports.Registry = void 0;
|
|
48
58
|
const Registry = __importStar(require("./registry/converters"));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"converters.js","sourceRoot":"","sources":["../../../../../src/packlets/iana/jar/language-subtags/converters.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG
|
|
1
|
+
{"version":3,"file":"converters.js","sourceRoot":"","sources":["../../../../../src/packlets/iana/jar/language-subtags/converters.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,gEAAkD;AAGzC,4BAAQ;AAFjB,wDAA0C;AAEvB,oBAAI","sourcesContent":["/*\n * Copyright (c) 2022 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport * as Registry from './registry/converters';\nimport * as Tags from './tags/converters';\n\nexport { Registry, Tags };\n"]}
|
|
@@ -36,13 +36,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
36
36
|
}) : function(o, v) {
|
|
37
37
|
o["default"] = v;
|
|
38
38
|
});
|
|
39
|
-
var __importStar = (this && this.__importStar) || function (
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
};
|
|
39
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
40
|
+
var ownKeys = function(o) {
|
|
41
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
42
|
+
var ar = [];
|
|
43
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
44
|
+
return ar;
|
|
45
|
+
};
|
|
46
|
+
return ownKeys(o);
|
|
47
|
+
};
|
|
48
|
+
return function (mod) {
|
|
49
|
+
if (mod && mod.__esModule) return mod;
|
|
50
|
+
var result = {};
|
|
51
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
52
|
+
__setModuleDefault(result, mod);
|
|
53
|
+
return result;
|
|
54
|
+
};
|
|
55
|
+
})();
|
|
46
56
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
47
57
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
48
58
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/packlets/iana/jar/language-subtags/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/packlets/iana/jar/language-subtags/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,yDAA2C;AAIlC,gCAAU;AAHnB,6CAA+B;AAGV,oBAAI;AADzB,0CAAwB","sourcesContent":["/*\n * Copyright (c) 2022 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport * as Converters from './converters';\nimport * as Tags from './tags';\n\nexport * from './model';\nexport { Converters, Tags };\n"]}
|
|
@@ -36,13 +36,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
36
36
|
}) : function(o, v) {
|
|
37
37
|
o["default"] = v;
|
|
38
38
|
});
|
|
39
|
-
var __importStar = (this && this.__importStar) || function (
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
};
|
|
39
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
40
|
+
var ownKeys = function(o) {
|
|
41
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
42
|
+
var ar = [];
|
|
43
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
44
|
+
return ar;
|
|
45
|
+
};
|
|
46
|
+
return ownKeys(o);
|
|
47
|
+
};
|
|
48
|
+
return function (mod) {
|
|
49
|
+
if (mod && mod.__esModule) return mod;
|
|
50
|
+
var result = {};
|
|
51
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
52
|
+
__setModuleDefault(result, mod);
|
|
53
|
+
return result;
|
|
54
|
+
};
|
|
55
|
+
})();
|
|
46
56
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47
57
|
exports.Tags = exports.Registry = void 0;
|
|
48
58
|
const Registry = __importStar(require("./registry/model"));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../../../../src/packlets/iana/jar/language-subtags/model.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG
|
|
1
|
+
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../../../../src/packlets/iana/jar/language-subtags/model.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,2DAA6C;AAGpC,4BAAQ;AAFjB,mDAAqC;AAElB,oBAAI","sourcesContent":["/*\n * Copyright (c) 2022 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport * as Registry from './registry/model';\nimport * as Tags from './tags/model';\n\nexport { Registry, Tags };\n"]}
|
|
@@ -37,13 +37,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
37
37
|
}) : function(o, v) {
|
|
38
38
|
o["default"] = v;
|
|
39
39
|
});
|
|
40
|
-
var __importStar = (this && this.__importStar) || function (
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
};
|
|
40
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
41
|
+
var ownKeys = function(o) {
|
|
42
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
43
|
+
var ar = [];
|
|
44
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
45
|
+
return ar;
|
|
46
|
+
};
|
|
47
|
+
return ownKeys(o);
|
|
48
|
+
};
|
|
49
|
+
return function (mod) {
|
|
50
|
+
if (mod && mod.__esModule) return mod;
|
|
51
|
+
var result = {};
|
|
52
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
53
|
+
__setModuleDefault(result, mod);
|
|
54
|
+
return result;
|
|
55
|
+
};
|
|
56
|
+
})();
|
|
47
57
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
58
|
exports.registryScopeType = exports.registryEntryType = void 0;
|
|
49
59
|
const Model = __importStar(require("./model"));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"converters.js","sourceRoot":"","sources":["../../../../../../src/packlets/iana/jar/language-subtags/registry/converters.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,2CAA2C
|
|
1
|
+
{"version":3,"file":"converters.js","sourceRoot":"","sources":["../../../../../../src/packlets/iana/jar/language-subtags/registry/converters.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,2CAA2C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE3C,+CAAiC;AAEjC,4CAA2C;AAE3C;;GAEG;AACU,QAAA,iBAAiB,GAAG,qBAAU,CAAC,eAAe,CACzD,KAAK,CAAC,qBAAqB,CAC5B,CAAC;AAEF;;GAEG;AACU,QAAA,iBAAiB,GAAG,qBAAU,CAAC,eAAe,CACzD,KAAK,CAAC,sBAAsB,CAC7B,CAAC","sourcesContent":["/*\n * Copyright (c) 2022 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n/* eslint-disable @rushstack/typedef-var */\n\nimport * as Model from './model';\n\nimport { Converters } from '@fgv/ts-utils';\n\n/**\n * @internal\n */\nexport const registryEntryType = Converters.enumeratedValue<Model.RegistryEntryType>(\n Model.allRegistryEntryTypes\n);\n\n/**\n * @internal\n */\nexport const registryScopeType = Converters.enumeratedValue<Model.RegistryEntryScope>(\n Model.allRegistryEntryScopes\n);\n"]}
|
|
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
18
18
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
19
19
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
20
20
|
};
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
28
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
39
|
exports.Converters = void 0;
|
|
30
40
|
/*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/packlets/iana/jar/language-subtags/registry/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/packlets/iana/jar/language-subtags/registry/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,uBAAuB;AACvB,0CAAwB;AAExB,yDAA2C;AAClC,gCAAU","sourcesContent":["/*\n * Copyright (c) 2022 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n// istanbul ignore file\nexport * from './model';\n\nimport * as Converters from './converters';\nexport { Converters };\n"]}
|
|
@@ -37,15 +37,29 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
37
37
|
}) : function(o, v) {
|
|
38
38
|
o["default"] = v;
|
|
39
39
|
});
|
|
40
|
-
var __importStar = (this && this.__importStar) || function (
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
};
|
|
40
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
41
|
+
var ownKeys = function(o) {
|
|
42
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
43
|
+
var ar = [];
|
|
44
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
45
|
+
return ar;
|
|
46
|
+
};
|
|
47
|
+
return ownKeys(o);
|
|
48
|
+
};
|
|
49
|
+
return function (mod) {
|
|
50
|
+
if (mod && mod.__esModule) return mod;
|
|
51
|
+
var result = {};
|
|
52
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
53
|
+
__setModuleDefault(result, mod);
|
|
54
|
+
return result;
|
|
55
|
+
};
|
|
56
|
+
})();
|
|
47
57
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
-
exports.extlangPrefix = exports.
|
|
58
|
+
exports.extlangPrefix = exports.extendedLanguageRange = exports.redundantTag = exports.grandfatheredTag = exports.variantSubtag = exports.regionSubtag = exports.scriptSubtag = exports.extlangSubtag = exports.languageSubtag = void 0;
|
|
59
|
+
exports.rangeOfTags = rangeOfTags;
|
|
60
|
+
exports.tagOrRange = tagOrRange;
|
|
61
|
+
exports.tagOrStartOfTagRange = tagOrStartOfTagRange;
|
|
62
|
+
exports.endOfTagRangeOrUndefined = endOfTagRangeOrUndefined;
|
|
49
63
|
const Validate = __importStar(require("./validate"));
|
|
50
64
|
const ts_utils_1 = require("@fgv/ts-utils");
|
|
51
65
|
/**
|
|
@@ -95,28 +109,24 @@ function rangeOfTags(tagConverter) {
|
|
|
95
109
|
return (0, ts_utils_1.mapResults)(elements.map((tag) => tagConverter.convert(tag)));
|
|
96
110
|
});
|
|
97
111
|
}
|
|
98
|
-
exports.rangeOfTags = rangeOfTags;
|
|
99
112
|
/**
|
|
100
113
|
* @internal
|
|
101
114
|
*/
|
|
102
115
|
function tagOrRange(tagConverter) {
|
|
103
116
|
return ts_utils_1.Converters.oneOf([tagConverter, rangeOfTags(tagConverter)]);
|
|
104
117
|
}
|
|
105
|
-
exports.tagOrRange = tagOrRange;
|
|
106
118
|
/**
|
|
107
119
|
* @internal
|
|
108
120
|
*/
|
|
109
121
|
function tagOrStartOfTagRange(tagConverter) {
|
|
110
122
|
return tagOrRange(tagConverter).map((t) => (Array.isArray(t) ? (0, ts_utils_1.succeed)(t[0]) : (0, ts_utils_1.succeed)(t)));
|
|
111
123
|
}
|
|
112
|
-
exports.tagOrStartOfTagRange = tagOrStartOfTagRange;
|
|
113
124
|
/**
|
|
114
125
|
* @internal
|
|
115
126
|
*/
|
|
116
127
|
function endOfTagRangeOrUndefined(tagConverter) {
|
|
117
128
|
return tagOrRange(tagConverter).map((t) => (Array.isArray(t) ? (0, ts_utils_1.succeed)(t[1]) : (0, ts_utils_1.succeed)(undefined)));
|
|
118
129
|
}
|
|
119
|
-
exports.endOfTagRangeOrUndefined = endOfTagRangeOrUndefined;
|
|
120
130
|
/**
|
|
121
131
|
* @internal
|
|
122
132
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"converters.js","sourceRoot":"","sources":["../../../../../../src/packlets/iana/jar/language-subtags/tags/converters.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,2CAA2C
|
|
1
|
+
{"version":3,"file":"converters.js","sourceRoot":"","sources":["../../../../../../src/packlets/iana/jar/language-subtags/tags/converters.ts"],"names":[],"mappings":"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","sourcesContent":["/*\n * Copyright (c) 2022 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n/* eslint-disable @rushstack/typedef-var */\n\nimport * as Validate from './validate';\n\nimport { Conversion, Converter, Converters, Result, fail, mapResults, succeed } from '@fgv/ts-utils';\n\nimport { LanguageSubtag } from './model';\n\n/**\n * @public\n */\nexport const languageSubtag = Validate.languageSubtag.converter;\n\n/**\n * @public\n */\nexport const extlangSubtag = Validate.extlangSubtag.converter;\n\n/**\n * @public\n */\nexport const scriptSubtag = Validate.scriptSubtag.converter;\n\n/**\n * @public\n */\nexport const regionSubtag = Validate.regionSubtag.converter;\n\n/**\n * @public\n */\nexport const variantSubtag = Validate.variantSubtag.converter;\n\n/**\n * @public\n */\nexport const grandfatheredTag = Validate.grandfatheredTag.converter;\n\n/**\n * @public\n */\nexport const redundantTag = Validate.redundantTag.converter;\n\n/**\n * @public\n */\nexport const extendedLanguageRange = Validate.extendedLanguageRange.converter;\n\n/**\n * @internal\n */\nexport function rangeOfTags<TTAG extends string>(tagConverter: Converter<TTAG>): Converter<TTAG[]> {\n return new Conversion.BaseConverter<TTAG[]>((from: unknown): Result<TTAG[]> => {\n if (typeof from !== 'string') {\n return fail('tagRange converter: not a string');\n }\n\n const elements = from.split('..');\n if (elements.length !== 2 || elements[0] === '' || elements[1] === '') {\n return fail(`\"${from}: malformed tag range`);\n }\n\n return mapResults(elements.map((tag) => tagConverter.convert(tag)));\n });\n}\n\n/**\n * @internal\n */\nexport function tagOrRange<TTAG extends string>(tagConverter: Converter<TTAG>): Converter<TTAG | TTAG[]> {\n return Converters.oneOf<TTAG | TTAG[]>([tagConverter, rangeOfTags(tagConverter)]);\n}\n\n/**\n * @internal\n */\nexport function tagOrStartOfTagRange<TTAG extends string>(tagConverter: Converter<TTAG>): Converter<TTAG> {\n return tagOrRange(tagConverter).map((t) => (Array.isArray(t) ? succeed(t[0]) : succeed(t)));\n}\n\n/**\n * @internal\n */\nexport function endOfTagRangeOrUndefined<TTAG extends string>(\n tagConverter: Converter<TTAG>\n): Converter<TTAG | undefined> {\n return tagOrRange(tagConverter).map((t) => (Array.isArray(t) ? succeed(t[1]) : succeed(undefined)));\n}\n\n/**\n * @internal\n */\nexport const extlangPrefix = Converters.arrayOf(languageSubtag).map((tags) => {\n if (tags.length !== 1) {\n return fail<LanguageSubtag>(`[${tags.join(', ')}]: malformed extlang prefix`);\n }\n return succeed(tags[0]);\n});\n"]}
|
|
@@ -36,13 +36,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
36
36
|
}) : function(o, v) {
|
|
37
37
|
o["default"] = v;
|
|
38
38
|
});
|
|
39
|
-
var __importStar = (this && this.__importStar) || function (
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
};
|
|
39
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
40
|
+
var ownKeys = function(o) {
|
|
41
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
42
|
+
var ar = [];
|
|
43
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
44
|
+
return ar;
|
|
45
|
+
};
|
|
46
|
+
return ownKeys(o);
|
|
47
|
+
};
|
|
48
|
+
return function (mod) {
|
|
49
|
+
if (mod && mod.__esModule) return mod;
|
|
50
|
+
var result = {};
|
|
51
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
52
|
+
__setModuleDefault(result, mod);
|
|
53
|
+
return result;
|
|
54
|
+
};
|
|
55
|
+
})();
|
|
46
56
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
47
57
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
48
58
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/packlets/iana/jar/language-subtags/tags/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/packlets/iana/jar/language-subtags/tags/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,yDAA2C;AAKlC,gCAAU;AAJnB,yDAA2C;AAItB,0BAAO;AAH5B,uDAAyC;AAGX,gCAAU;AADxC,0CAAwB","sourcesContent":["/*\n * Copyright (c) 2022 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport * as Converters from './converters';\nimport * as Helpers from './tagValidation';\nimport * as Validators from './validate';\n\nexport * from './model';\nexport { Converters, Helpers, Validators };\n"]}
|
|
@@ -39,13 +39,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
39
39
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
40
40
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
41
41
|
};
|
|
42
|
-
var __importStar = (this && this.__importStar) || function (
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
};
|
|
42
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
43
|
+
var ownKeys = function(o) {
|
|
44
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
45
|
+
var ar = [];
|
|
46
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
47
|
+
return ar;
|
|
48
|
+
};
|
|
49
|
+
return ownKeys(o);
|
|
50
|
+
};
|
|
51
|
+
return function (mod) {
|
|
52
|
+
if (mod && mod.__esModule) return mod;
|
|
53
|
+
var result = {};
|
|
54
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
55
|
+
__setModuleDefault(result, mod);
|
|
56
|
+
return result;
|
|
57
|
+
};
|
|
58
|
+
})();
|
|
49
59
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50
60
|
exports.LanguageSubtags = void 0;
|
|
51
61
|
__exportStar(require("./jarModel"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../../../src/packlets/iana/jar/model.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG
|
|
1
|
+
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../../../src/packlets/iana/jar/model.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6CAA2B;AAE3B,0EAA4D;AACnD,0CAAe","sourcesContent":["/*\n * Copyright (c) 2022 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nexport * from './jarModel';\n\nimport * as LanguageSubtags from './language-subtags/model';\nexport { LanguageSubtags };\n"]}
|
|
@@ -36,15 +36,26 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
36
36
|
}) : function(o, v) {
|
|
37
37
|
o["default"] = v;
|
|
38
38
|
});
|
|
39
|
-
var __importStar = (this && this.__importStar) || function (
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
};
|
|
39
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
40
|
+
var ownKeys = function(o) {
|
|
41
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
42
|
+
var ar = [];
|
|
43
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
44
|
+
return ar;
|
|
45
|
+
};
|
|
46
|
+
return ownKeys(o);
|
|
47
|
+
};
|
|
48
|
+
return function (mod) {
|
|
49
|
+
if (mod && mod.__esModule) return mod;
|
|
50
|
+
var result = {};
|
|
51
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
52
|
+
__setModuleDefault(result, mod);
|
|
53
|
+
return result;
|
|
54
|
+
};
|
|
55
|
+
})();
|
|
46
56
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47
|
-
exports.
|
|
57
|
+
exports.registryFile = exports.registeredItem = exports.registeredRedundantTag = exports.registeredGrandfatheredTag = exports.registeredVariant = exports.registeredRegion = exports.registeredScript = exports.registeredExtLang = exports.registeredLanguage = exports.extendedLanguageRange = exports.Tags = void 0;
|
|
58
|
+
exports.loadLanguageSubtagsJsonFileSync = loadLanguageSubtagsJsonFileSync;
|
|
48
59
|
/* eslint-disable @rushstack/typedef-var */
|
|
49
60
|
const TagConverters = __importStar(require("../jar/language-subtags/tags/converters"));
|
|
50
61
|
exports.Tags = TagConverters;
|
|
@@ -205,5 +216,4 @@ exports.registryFile = (0, converters_1.datedRegistry)(exports.registeredItem);
|
|
|
205
216
|
function loadLanguageSubtagsJsonFileSync(path) {
|
|
206
217
|
return ts_json_base_1.JsonFile.convertJsonFileSync(path, exports.registryFile);
|
|
207
218
|
}
|
|
208
|
-
exports.loadLanguageSubtagsJsonFileSync = loadLanguageSubtagsJsonFileSync;
|
|
209
219
|
//# sourceMappingURL=converters.js.map
|