Socket
Socket
Sign inDemoInstall

whatwg-url

Package Overview
Dependencies
3
Maintainers
6
Versions
63
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 8.7.0 to 9.0.0

10

dist/encoding.js
"use strict";
let { TextEncoder, TextDecoder } = require("util");
// Handle browserify's lack of support (https://github.com/browserify/node-util/issues/46), which
// is important for the live viewer:
if (!TextEncoder) {
TextEncoder = global.TextEncoder;
}
if (!TextDecoder) {
TextDecoder = global.TextDecoder;
}
const utf8Encoder = new TextEncoder();

@@ -13,0 +3,0 @@ const utf8Decoder = new TextDecoder("utf-8", { ignoreBOM: true });

5

dist/percent-encoding.js

@@ -32,6 +32,3 @@ "use strict";

// TODO: remove the Buffer.from in the next major version; it's only needed for back-compat, and sticking to standard
// typed arrays is nicer and simpler.
// See https://github.com/jsdom/data-urls/issues/17 for background.
return Buffer.from(output.slice(0, outputIndex));
return output.slice(0, outputIndex);
}

@@ -38,0 +35,0 @@

"use strict";
const punycode = require("punycode");
const tr46 = require("tr46");

@@ -172,3 +171,3 @@

input = punycode.ucs2.decode(input);
input = Array.from(input, c => c.codePointAt(0));

@@ -498,3 +497,3 @@ if (input[pointer] === 58) {

this.input = punycode.ucs2.decode(this.input);
this.input = Array.from(this.input, c => c.codePointAt(0));

@@ -501,0 +500,0 @@ for (; this.pointer <= this.input.length; ++this.pointer) {

12

dist/URLSearchParams-impl.js
"use strict";
const stableSortBy = require("lodash/sortBy");
const urlencoded = require("./urlencoded");

@@ -111,3 +110,12 @@

sort() {
this._list = stableSortBy(this._list, [0]);
this._list.sort((a, b) => {
if (a[0] < b[0]) {
return -1;
}
if (a[0] > b[0]) {
return 1;
}
return 0;
});
this._updateSteps();

@@ -114,0 +122,0 @@ }

@@ -24,2 +24,3 @@ "use strict";

exports.percentDecode = percentEncoding.percentDecodeBytes;
exports.percentDecodeString = percentEncoding.percentDecodeString;
exports.percentDecodeBytes = percentEncoding.percentDecodeBytes;
{
"name": "whatwg-url",
"version": "8.7.0",
"version": "9.0.0",
"description": "An implementation of the WHATWG URL Standard's URL API and parsing machinery",

@@ -15,3 +15,2 @@ "main": "index.js",

"dependencies": {
"lodash": "^4.7.0",
"tr46": "^2.1.0",

@@ -32,3 +31,3 @@ "webidl-conversions": "^6.1.0"

"engines": {
"node": ">=10"
"node": ">=12"
},

@@ -35,0 +34,0 @@ "scripts": {

@@ -32,3 +32,4 @@ # whatwg-url

- [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)`

@@ -35,0 +36,0 @@ The `stateOverride` parameter is one of the following strings:

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc