You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

whatwg-url-without-unicode

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

whatwg-url-without-unicode - npm Package Compare versions

Comparing version

to
9.1.0-beta.0

dist/encoding.js

11

index.js
"use strict";
const { URL, URLSearchParams } = require("./webidl2js-wrapper");
const urlStateMachine = require("./lib/url-state-machine");
const urlEncoded = require("./lib/urlencoded");
const urlStateMachine = require("./dist/url-state-machine");
const percentEncoding = require("./dist/percent-encoding");
const sharedGlobalObject = {};
URL.install(sharedGlobalObject);
URLSearchParams.install(sharedGlobalObject);
URL.install(sharedGlobalObject, ["Window"]);
URLSearchParams.install(sharedGlobalObject, ["Window"]);

@@ -24,2 +24,3 @@ exports.URL = sharedGlobalObject.URL;

exports.percentDecode = urlEncoded.percentDecode;
exports.percentDecodeString = percentEncoding.percentDecodeString;
exports.percentDecodeBytes = percentEncoding.percentDecodeBytes;
{
"name": "whatwg-url-without-unicode",
"version": "8.0.0",
"version": "9.1.0-beta.0",
"description": "An implementation of the WHATWG URL Standard's URL API and parsing machinery, without unicode support",

@@ -9,3 +9,3 @@ "main": "index.js",

"webidl2js-wrapper.js",
"lib/"
"dist/"
],

@@ -16,23 +16,23 @@ "author": "Sebastian Mayr <github@smayr.name>",

"dependencies": {
"lodash.sortby": "^4.7.0",
"webidl-conversions": "^5.0.0"
"webidl-conversions": "^6.1.0"
},
"devDependencies": {
"browserify": "^16.5.0",
"@domenic/eslint-config": "^1.2.0",
"browserify": "^17.0.0",
"domexception": "^2.0.1",
"eslint": "^6.8.0",
"got": "^10.2.1",
"jest": "^24.9.0",
"recast": "^0.18.5",
"webidl2js": "^12.0.0"
"eslint": "^7.29.0",
"glob": "^7.1.7",
"got": "^11.8.2",
"jest": "^27.0.5",
"recast": "^0.20.4",
"webidl2js": "^16.2.0"
},
"engines": {
"node": ">=10"
"node": ">=12"
},
"scripts": {
"build": "node scripts/transform.js && node scripts/convert-idl.js",
"coverage": "jest --coverage",
"lint": "eslint .",
"prepare": "node scripts/transform.js && node scripts/convert-idl.js",
"pretest": "node scripts/get-latest-platform-tests.js && node scripts/transform.js && node scripts/convert-idl.js",
"prepare": "node scripts/transform.js",
"pretest": "node scripts/get-latest-platform-tests.js && node scripts/transform.js",
"build-live-viewer": "browserify index.js --standalone whatwgURL > live-viewer/whatwg-url.js",

@@ -60,2 +60,2 @@ "test": "jest"

}
}
}

@@ -5,10 +5,12 @@ # whatwg-url-without-unicode

whatwg-url is a full implementation of the WHATWG [URL Standard](https://url.spec.whatwg.org/). It can be used standalone, but it also exposes a lot of the internal algorithms that are useful for integrating a URL parser into a project like [jsdom](https://github.com/tmpvar/jsdom).
whatwg-url is a full implementation of the WHATWG [URL Standard](https://url.spec.whatwg.org/). It can be used standalone, but it also exposes a lot of the internal algorithms that are useful for integrating a URL parser into a project like [jsdom](https://github.com/jsdom/jsdom).
## Specification conformance
whatwg-url is currently up to date with the URL spec up to commit [7ae1c69](https://github.com/whatwg/url/commit/7ae1c691c96f0d82fafa24c33aa1e8df9ffbf2bc).
whatwg-url is currently up to date with the URL spec up to commit [ab0e820](https://github.com/whatwg/url/commit/ab0e820b0b559610b30c731b7f2c1a8094181680).
For `file:` URLs, whose [origin is left unspecified](https://url.spec.whatwg.org/#concept-url-origin), whatwg-url chooses to use a new opaque origin (which serializes to `"null"`).
whatwg-url does not yet implement any encoding handling beyond UTF-8. That is, the _encoding override_ parameter does not exist in our API.
## API

@@ -24,4 +26,4 @@

- [URL parser](https://url.spec.whatwg.org/#concept-url-parser): `parseURL(input, { baseURL, encodingOverride })`
- [Basic URL parser](https://url.spec.whatwg.org/#concept-basic-url-parser): `basicURLParse(input, { baseURL, encodingOverride, url, stateOverride })`
- [URL parser](https://url.spec.whatwg.org/#concept-url-parser): `parseURL(input, { baseURL })`
- [Basic URL parser](https://url.spec.whatwg.org/#concept-basic-url-parser): `basicURLParse(input, { baseURL, url, stateOverride })`
- [URL serializer](https://url.spec.whatwg.org/#concept-url-serializer): `serializeURL(urlRecord, excludeFragment)`

@@ -34,3 +36,4 @@ - [Host serializer](https://url.spec.whatwg.org/#concept-host-serializer): `serializeHost(hostFromURLRecord)`

- [Cannot have a username/password/port](https://url.spec.whatwg.org/#cannot-have-a-username-password-port): `cannotHaveAUsernamePasswordPort(urlRecord)`
- [Percent decode](https://url.spec.whatwg.org/#percent-decode): `percentDecode(buffer)`
- [Percent decode bytes](https://url.spec.whatwg.org/#percent-decode): `percentDecodeBytes(uint8Array)`
- [Percent decode a string](https://url.spec.whatwg.org/#percent-decode-string): `percentDecodeString(string)`

@@ -85,3 +88,3 @@ The `stateOverride` parameter is one of the following strings:

npm
npm install

@@ -98,3 +101,3 @@ To run tests:

npm run build
npm run prepare
npm run build-live-viewer

@@ -101,0 +104,0 @@

"use strict";
const URL = require("./lib/URL");
const URLSearchParams = require("./lib/URLSearchParams");
const URL = require("./dist/URL");
const URLSearchParams = require("./dist/URLSearchParams");
exports.URL = URL;
exports.URLSearchParams = URLSearchParams;