identifier-js 0.0.8 → 0.0.9

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.
Files changed (3) hide show
  1. package/index.js +2 -1
  2. package/package.json +3 -5
  3. package/readme.md +10 -3
package/index.js CHANGED
@@ -283,8 +283,9 @@ module.exports = {
283
283
  parseIri: (string) => parse(string, 'IRI'),
284
284
  parseIriReference: (string) => parse(string, 'IRI_reference'),
285
285
  parseAbsoluteIri: (string) => parse(string, 'absolute_IRI'),
286
- resolveReference, // not yet decided if the return should be normalized or not, and in what extent
286
+ resolveReference,
287
287
  normalizeReference: (string) => string, // not done yet
288
288
  toAbsoluteReference: (string) => resolveReference('', string),
289
289
  toRelativeReference,
290
290
  };
291
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "identifier-js",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "description": "A RFC3986 / RFC3987 compliant fast parser/validator/resolver/composer for NodeJS and browser.",
5
5
  "keywords": [
6
6
  "IRI",
@@ -12,10 +12,8 @@
12
12
  "uuid",
13
13
  "parser",
14
14
  "validator",
15
- "RFC",
16
- "3987",
17
- "RFC",
18
- "3986"
15
+ "RFC3986",
16
+ "RFC3987"
19
17
  ],
20
18
  "homepage": "https://github.com/SorinGFS/identifier-js#readme",
21
19
  "bugs": {
package/readme.md CHANGED
@@ -8,7 +8,14 @@ description: A RFC3986 / RFC3987 compliant fast parser/validator/resolver/compos
8
8
 
9
9
  ## Overview
10
10
 
11
- A fully RFC [3986](https://datatracker.ietf.org/doc/html/rfc3986.html)/[3897](https://datatracker.ietf.org/doc/html/rfc3987.html) compliant URI/IRI parser, validator, resolver and composer, along with other identifier utilities.
11
+ A fully RFC [3986](https://datatracker.ietf.org/doc/html/rfc3986.html)/[3897](https://datatracker.ietf.org/doc/html/rfc3987.html) compliant URI/IRI parser, validator, resolver and composer, along with other identifier utilities. This library implements the following [IANA registered](https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml) schemes:
12
+ - `http` defined by [RFC9110, Section 4.2.1](https://datatracker.ietf.org/doc/html/rfc9110#section-4.2.1)
13
+ - `https` defined by [RFC9110, Section 4.2.2](https://datatracker.ietf.org/doc/html/rfc9110#section-4.2.2)
14
+ - `ws` defined by [RFC6455, Section 3](https://datatracker.ietf.org/doc/html/rfc6455#section-3)
15
+ - `wss` defined by [RFC6455, Section 3](https://datatracker.ietf.org/doc/html/rfc6455#section-3)
16
+ - `file` defined by [RFC8089, Section 2](https://datatracker.ietf.org/doc/html/rfc8089#section-2)
17
+
18
+ Other schemes that are `IANA registered` schemes and compliant with the generic `URI` or `IRI` syntax are also supported. As for the identifiers that are not `IANA registered`, but compliant with the generic `URI` or `IRI` syntax, the preferred schemes are `uri` and respectively `iri`.
12
19
 
13
20
  ## Install
14
21
 
@@ -81,8 +88,8 @@ Resolve a reference against a base identifier:
81
88
  - resolveReference: (reference: string, base: string, strict?: boolean, returnParts?: boolean) => string
82
89
 
83
90
  **Note:**
84
- - strict enables strict resolution behavior.
85
- - returnParts returns structured components instead of a string.
91
+ - strict (default: `true`) enables strict resolution behavior.
92
+ - returnParts (default: `false`) returns structured components instead of a string.
86
93
 
87
94
  Convert a reference into absolute form:
88
95
  - toAbsoluteReference: (reference: string) => string