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

@types/whatwg-url

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/whatwg-url

TypeScript definitions for whatwg-url

  • 6.4.0
  • ts2.0
  • ts2.1
  • ts2.2
  • ts2.3
  • ts2.4
  • ts2.5
  • ts2.6
  • ts2.7
  • ts2.8
  • ts2.9
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is @types/whatwg-url?

@types/whatwg-url provides TypeScript type definitions for the whatwg-url package, which is a JavaScript implementation of the URL Standard. This package allows developers to parse, serialize, and manipulate URLs in a way that is compliant with the WHATWG URL Standard.

What are @types/whatwg-url's main functionalities?

URL Parsing

This feature allows you to parse a URL string into a URL object, which provides properties and methods to access different parts of the URL.

const { URL } = require('whatwg-url');
const myURL = new URL('https://example.com/path?name=value#hash');
console.log(myURL.hostname); // 'example.com'

URL Serialization

This feature allows you to serialize a URL object back into a string, which can be useful for generating URLs dynamically.

const { URL } = require('whatwg-url');
const myURL = new URL('https://example.com/path?name=value#hash');
console.log(myURL.href); // 'https://example.com/path?name=value#hash'

URL Manipulation

This feature allows you to manipulate different parts of the URL, such as the pathname, search parameters, and hash.

const { URL } = require('whatwg-url');
const myURL = new URL('https://example.com/path?name=value#hash');
myURL.pathname = '/newpath';
console.log(myURL.href); // 'https://example.com/newpath?name=value#hash'

Other packages similar to @types/whatwg-url

FAQs

Package last updated on 29 Mar 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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