November's Paddleball Marathon

    jsdom-url
    TypeScript icon, indicating that this package has built-in type declarations

    3.0.1 • Public • Published

    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
    

    Install

    npm i jsdom-url

    DownloadsWeekly Downloads

    79

    Version

    3.0.1

    License

    ISC

    Unpacked Size

    26.5 kB

    Total Files

    14

    Last publish

    Collaborators

    • bluelovers