url-sanitizer 0.1.3 → 0.1.4

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 CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![build](https://github.com/asamuzaK/urlSanitizer/workflows/build/badge.svg)](https://github.com/asamuzaK/urlSanitizer/actions?query=workflow%3Abuild)
4
4
  [![CodeQL](https://github.com/asamuzaK/urlSanitizer/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/asamuzaK/urlSanitizer/actions?query=workflow%3Agithub-code-scanning%3Acodeql)
5
- [![npm package](https://badge.fury.io/js/url-sanitizer.svg)](https://badge.fury.io/js/url-sanitizer)
5
+ ![version](https://img.shields.io/github/package-json/v/asamuzaK/urlSanitizer)
6
6
 
7
7
  URL sanitizer for Node.js (>=18), browsers and web sites.
8
8
  **Experimental**
@@ -85,7 +85,8 @@ Determines whether the given URI is valid.
85
85
 
86
86
  * `uri` **[string][1]** URI input
87
87
 
88
- Returns **[Promise][5]<[boolean][3]?>** result
88
+ Returns **[Promise][5]<[boolean][3]>** result
89
+ * Always `true` for `web+*` and/or `ext+*` schemes
89
90
 
90
91
  ```javascript
91
92
  const res1 = await isURI('https://example.com/foo');
@@ -111,7 +112,7 @@ Synchronous version of the [isURI()](#isuriuri).
111
112
 
112
113
  Get an array of URI schemes registered at [iana.org](https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml "Uniform Resource Identifier (URI) Schemes").
113
114
  * Historical schemes omitted.
114
- * `moz-extension` scheme added by default.
115
+ * `moz-extension` scheme added.
115
116
 
116
117
  Returns **[Array][2]<[string][1]>** array of registered URI schemes
117
118
 
@@ -129,7 +130,6 @@ Check if the given scheme is registered.
129
130
  * `scheme` **[string][1]** scheme
130
131
 
131
132
  Returns **[boolean][3]** result
132
- * Always `true` for `web+*` and/or `ext+*` schemes
133
133
 
134
134
  ```javascript
135
135
  const res1 = urlSanitizer.has('https');
@@ -137,9 +137,6 @@ const res1 = urlSanitizer.has('https');
137
137
 
138
138
  const res2 = urlSanitizer.has('foo');
139
139
  // -> false
140
-
141
- const res3 = uriSanitizer.has('web+foo');
142
- // -> true
143
140
  ```
144
141
 
145
142
  ### urlSanitizer.add(scheme)
package/package.json CHANGED
@@ -52,5 +52,5 @@
52
52
  "sinon": "^15.0.1",
53
53
  "undici": "^5.15.0"
54
54
  },
55
- "version": "0.1.3"
55
+ "version": "0.1.4"
56
56
  }
@@ -110,7 +110,7 @@ export class URISchemes {
110
110
  *
111
111
  * @see {@link https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml}
112
112
  * - Historical schemes omitted
113
- * - Added 'moz-extension' scheme by default
113
+ * - 'moz-extension' scheme added
114
114
  * @returns {Array.<string>} - array of schemes
115
115
  */
116
116
  get() {