GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - passy/node-dom-urls: A partial implementation of the W3C URL Spec Draft for Node

BranchesTags
Open more actions menu

Latest commit

 

History

22 Commits
22 Commits

Folders and files

NameName
Last commit message
Last commit date
.editorconfig
.editorconfig
 
 
.gitignore
.gitignore
 
 
.jshintrc
.jshintrc
 
 
.travis.yml
.travis.yml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
index.js
index.js
 
 
package.json
package.json
 
 
test.js
test.js
 
 

Repository files navigation

Node DOM URLs

Build Status Code Climate Analytics

A partial implementation of the W3C URL Spec Draft for Node building on top of URIjs.

If you find incompatibilities, please report them. Error handling is currently very different from the spec.

Browser Polyfills

  • Joshua Bell's Polyfill
  • Eric Arvidsson's Polyfill

Installation

npm install dom-urls

Example

var URL = require('dom-urls');

var url = new URL('relative', 'http://example.com/sub/');

url.protocol; // 'http:'
url.hostname; // 'example.com'
url.pathname; // '/sub/relative/'

url.host = 'example.net:8080';
url.port; // '8080'

Why urijs instead of url?

I tried it first, but Node's own URL module doesn't propagate changes, so changing the host doesn't affect the port and vice-versa and I didn't want to reimplement all of that myself.

About

A partial implementation of the W3C URL Spec Draft for Node

Resources

Readme
MIT license
Activity

Stars

15 stars

Watchers

1 watching

Forks

3 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.