Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tinyhttp/encode-url

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tinyhttp/encode-url - npm Package Compare versions

Comparing version 2.0.7 to 2.0.8

dist/index.d.ts.map

1

dist/index.d.ts
export declare const encodeUrl: (url: string) => string;
//# sourceMappingURL=index.d.ts.map

2

dist/index.js
const ENCODE_CHARS_REGEXP = /(?:[^\x21\x25\x26-\x3B\x3D\x3F-\x5B\x5D\x5F\x61-\x7A\x7E]|%(?:[^0-9A-Fa-f]|[0-9A-Fa-f][^0-9A-Fa-f]|$))+/g;
const UNMATCHED_SURROGATE_PAIR_REGEXP = /(^|[^\uD800-\uDBFF])[\uDC00-\uDFFF]|[\uD800-\uDBFF]([^\uDC00-\uDFFF]|$)/g;
const UNMATCHED_SURROGATE_PAIR_REPLACE = "$1\uFFFD$2";
const UNMATCHED_SURROGATE_PAIR_REPLACE = "$1�$2";
const encodeUrl = (url) => {

@@ -5,0 +5,0 @@ return String(url).replace(UNMATCHED_SURROGATE_PAIR_REGEXP, UNMATCHED_SURROGATE_PAIR_REPLACE).replace(ENCODE_CHARS_REGEXP, encodeURI);

{
"name": "@tinyhttp/encode-url",
"version": "2.0.7",
"version": "2.0.8",
"description": "encode-url rewrite in TypeScript",

@@ -30,5 +30,4 @@ "type": "module",

"dev": "vite",
"build": "vite build",
"postbuild": "tsc --emitDeclarationOnly"
"build": "vite build"
}
}
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc