Socket
Socket
Sign inDemoInstall

ufo

Package Overview
Dependencies
Maintainers
3
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ufo - npm Package Compare versions

Comparing version 0.7.5 to 0.7.6

2

dist/index.js

@@ -394,3 +394,3 @@ 'use strict';

function stringifyParsedURL(parsed) {
const fullpath = parsed.pathname + (parsed.search ? "?" + parsed.search : "") + parsed.hash;
const fullpath = parsed.pathname + (parsed.search ? (parsed.search.startsWith("?") ? "" : "?") + parsed.search : "") + parsed.hash;
if (!parsed.protocol) {

@@ -397,0 +397,0 @@ return fullpath;

{
"name": "ufo",
"version": "0.7.5",
"version": "0.7.6",
"description": "URL utils for humans",

@@ -5,0 +5,0 @@ "repository": "unjs/ufo",

@@ -65,2 +65,15 @@ [![npm version][npm-version-src]][npm-version-href]

### `parseURL`
```ts
// Result: { protocol: 'http:', auth: '', host: 'foo.com', pathname: '/foo', search: '?test=123', hash: '#token' }
parseURL('http://foo.com/foo?test=123#token')
// Result: { pathname: 'foo.com/foo', search: '?test=123', hash: '#token' }
parseURL('foo.com/foo?test=123#token')
// Result: { protocol: 'https:', auth: '', host: 'foo.com', pathname: '/foo', search: '?test=123', hash: '#token' }
parseURL('foo.com/foo?test=123#token', 'https://')
```
### `withQuery`

@@ -67,0 +80,0 @@

Sorry, the diff of this file is not supported yet

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