Socket
Socket
Sign inDemoInstall

jsdom-url

Package Overview
Dependencies
9
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    jsdom-url

a proxy JSDOM URL object


Version published
Weekly downloads
83
decreased by-23.15%
Maintainers
1
Install size
4.36 MB
Created
Weekly downloads
 

Readme

Source

jsdom-url

a proxy JSDOM URL object

npm install jsdom-url

demo

import URL from 'jsdom-url';

let url = new URL('https://www.npmjs.com/package/jsdom-url');

console.log(url);

console.log(`-------------`);

console.log(Object.keys(url));

console.log(`-------------`);

console.dir(url);

console.log(`-------------`);

for (let k in url)
{
	console.log(k, url[k]);
}

console.log(`-------------`);

console.log(url.origin);

output

URL("https://www.npmjs.com/package/jsdom-url")
-------------
[ 'href',
  'origin',
  'protocol',
  'username',
  'password',
  'host',
  'hostname',
  'port',
  'pathname',
  'search',
  'hash',
  'searchParams' ]
-------------
URLImplCore {
  href: 'https://www.npmjs.com/package/jsdom-url',
  origin: 'https://www.npmjs.com',
  protocol: 'https:',
  username: '',
  password: '',
  host: 'www.npmjs.com',
  hostname: 'www.npmjs.com',
  port: '',
  pathname: '/package/jsdom-url',
  search: '',
  hash: '',
  searchParams: 
   URLSearchParamsImpl {
     _list: [],
     _url: URLImplCore { _url: [Object], _query: [Circular] },
     [Symbol(wrapper)]: URLSearchParams {} } }
-------------
href https://www.npmjs.com/package/jsdom-url
origin https://www.npmjs.com
protocol https:
username 
password 
host www.npmjs.com
hostname www.npmjs.com
port 
pathname /package/jsdom-url
search 
hash 
searchParams URLSearchParamsImpl {
  _list: [],
  _url: URL("https://www.npmjs.com/package/jsdom-url"),
  [Symbol(wrapper)]: URLSearchParams("") }
-------------
https://www.npmjs.com

Keywords

FAQs

Last updated on 02 Dec 2019

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc