@siteimprove/alfa-iana 0.111.0 → 0.112.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.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # @siteimprove/alfa-iana
2
2
 
3
+ ## 0.112.0
4
+
3
5
  ## 0.111.0
4
6
 
5
7
  ## 0.110.0
@@ -177,11 +177,6 @@ export declare namespace Language {
177
177
  function isName(name: string): name is Name;
178
178
  }
179
179
  const variant: typeof Variant.of, isVariant: typeof Variant.isVariant, isVariantName: typeof Variant.isName;
180
- }
181
- /**
182
- * @public
183
- */
184
- export declare namespace Language {
185
180
  function parse(input: string): Result<Language, string>;
186
181
  }
187
182
  //# sourceMappingURL=language.d.ts.map
package/dist/language.js CHANGED
@@ -284,11 +284,6 @@ export class Language {
284
284
  Variant.isName = isName;
285
285
  })(Variant = Language.Variant || (Language.Variant = {}));
286
286
  Language.variant = Variant.of, Language.isVariant = Variant.isVariant, Language.isVariantName = Variant.isName;
287
- })(Language || (Language = {}));
288
- /**
289
- * @public
290
- */
291
- (function (Language) {
292
287
  function parse(input) {
293
288
  let parts = Slice.of(input.toLowerCase().split("-"));
294
289
  return parts
@@ -297,23 +292,23 @@ export class Language {
297
292
  if (!Language.isPrimaryName(name)) {
298
293
  return Err.of(`${name} is not a valid primary language`);
299
294
  }
300
- const primary = Language.Primary.of(name);
295
+ const primary = Primary.of(name);
301
296
  parts = parts.slice(1);
302
- const extended = parts.get(0).filter(Language.isExtendedName).map(Language.Extended.of);
297
+ const extended = parts.get(0).filter(Language.isExtendedName).map(Extended.of);
303
298
  if (extended.isSome()) {
304
299
  parts = parts.slice(1);
305
300
  }
306
- const script = parts.get(0).filter(Language.isScriptName).map(Language.Script.of);
301
+ const script = parts.get(0).filter(Language.isScriptName).map(Script.of);
307
302
  if (script.isSome()) {
308
303
  parts = parts.slice(1);
309
304
  }
310
- const region = parts.get(0).filter(Language.isRegionName).map(Language.Region.of);
305
+ const region = parts.get(0).filter(Language.isRegionName).map(Region.of);
311
306
  if (region.isSome()) {
312
307
  parts = parts.slice(1);
313
308
  }
314
309
  const variants = [];
315
310
  while (true) {
316
- const variant = parts.get(0).filter(Language.isVariantName).map(Language.Variant.of);
311
+ const variant = parts.get(0).filter(Language.isVariantName).map(Variant.of);
317
312
  if (variant.isSome()) {
318
313
  parts = parts.slice(1);
319
314
  variants.push(variant.get());
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "$schema": "http://json.schemastore.org/package",
3
3
  "name": "@siteimprove/alfa-iana",
4
4
  "homepage": "https://alfa.siteimprove.com",
5
- "version": "0.111.0",
5
+ "version": "0.112.0",
6
6
  "license": "MIT",
7
7
  "description": "Functionality for working with the different IANA registries, such as the language subtag registry",
8
8
  "repository": {
@@ -25,14 +25,14 @@
25
25
  "generate": "node scripts/languages.js"
26
26
  },
27
27
  "dependencies": {
28
- "@siteimprove/alfa-equatable": "^0.111.0",
29
- "@siteimprove/alfa-json": "^0.111.0",
30
- "@siteimprove/alfa-option": "^0.111.0",
31
- "@siteimprove/alfa-result": "^0.111.0",
32
- "@siteimprove/alfa-slice": "^0.111.0"
28
+ "@siteimprove/alfa-equatable": "^0.112.0",
29
+ "@siteimprove/alfa-json": "^0.112.0",
30
+ "@siteimprove/alfa-option": "^0.112.0",
31
+ "@siteimprove/alfa-result": "^0.112.0",
32
+ "@siteimprove/alfa-slice": "^0.112.0"
33
33
  },
34
34
  "devDependencies": {
35
- "@siteimprove/alfa-test": "^0.111.0",
35
+ "@siteimprove/alfa-test": "^0.112.0",
36
36
  "axios": "^1.13.5",
37
37
  "prettier": "^3.8.1"
38
38
  },