bare-url 2.1.2 → 2.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/global.d.ts +4 -2
- package/index.d.ts +3 -1
- package/index.js +2 -1
- package/lib/errors.d.ts +8 -0
- package/package.json +2 -2
- package/prebuilds/darwin-arm64/bare-url.bare +0 -0
- package/prebuilds/darwin-x64/bare-url.bare +0 -0
- package/prebuilds/ios-arm64/bare-url.bare +0 -0
- package/prebuilds/ios-arm64-simulator/bare-url.bare +0 -0
- package/prebuilds/ios-x64-simulator/bare-url.bare +0 -0
- package/prebuilds/linux-arm64/bare-url.bare +0 -0
- package/prebuilds/win32-arm64/bare-url.bare +0 -0
- package/prebuilds/win32-x64/bare-url.bare +0 -0
package/global.d.ts
CHANGED
package/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import URLError from './lib/errors'
|
|
2
|
+
|
|
1
3
|
interface URL {
|
|
2
4
|
href: string
|
|
3
5
|
protocol: string
|
|
@@ -29,7 +31,7 @@ declare namespace URL {
|
|
|
29
31
|
|
|
30
32
|
export function pathToFileURL(pathname: string): URL
|
|
31
33
|
|
|
32
|
-
export { URL }
|
|
34
|
+
export { URL, type URLError, URLError as errors }
|
|
33
35
|
}
|
|
34
36
|
|
|
35
37
|
export = URL
|
package/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* global Bare */
|
|
2
1
|
const path = require('bare-path')
|
|
3
2
|
const binding = require('./binding')
|
|
4
3
|
const errors = require('./lib/errors')
|
|
@@ -275,6 +274,8 @@ const URL = exports
|
|
|
275
274
|
|
|
276
275
|
exports.URL = URL // For Node.js compatibility
|
|
277
276
|
|
|
277
|
+
exports.errors = errors
|
|
278
|
+
|
|
278
279
|
exports.isURL = function isURL(value) {
|
|
279
280
|
if (typeof value !== 'object' || value === null) return false
|
|
280
281
|
|
package/lib/errors.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
declare class URLError extends Error {
|
|
2
|
+
static INVALID_URL(msg?: string): URLError
|
|
3
|
+
static INVALID_URL_SCHEME(msg?: string): URLError
|
|
4
|
+
static INVALID_FILE_URL_HOST(msg?: string): URLError
|
|
5
|
+
static INVALID_FILE_URL_PATH(msg?: string): URLError
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export = URLError
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bare-url",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.4",
|
|
4
4
|
"description": "WHATWG URL implementation for JavaScript",
|
|
5
5
|
"exports": {
|
|
6
|
+
"./package": "./package.json",
|
|
6
7
|
".": {
|
|
7
8
|
"types": "./index.d.ts",
|
|
8
9
|
"default": "./index.js"
|
|
9
10
|
},
|
|
10
|
-
"./package": "./package.json",
|
|
11
11
|
"./global": {
|
|
12
12
|
"types": "./global.d.ts",
|
|
13
13
|
"default": "./global.js"
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|