1.0.8 • Published 8 years ago

node.url v1.0.8

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

node.url

npm

url paraser for javascript

Installation

$ npm install node.url

Usage

const url = require("node.url");
const str = "http://user:pass@host.com:8080/p/a/t/h?query=string#hash";

console.log(str.parseUrl());
console.log(url(str));

// Result:
{
  protocol: 'http:',
  slashes: true,
  auth: 'user:pass',
  host: 'host.com:8080',
  port: '8080',
  hostname: 'host.com',
  hash: '#hash',
  search: '?query=string',
  query: 'query=string',
  pathname: '/p/a/t/h',
  path: '/p/a/t/h?query=string',
  href: 'http://user:pass@host.com:8080/p/a/t/h?query=string#hash',
  params: { 
    query: 'string'
  } 
 }
1.0.8

8 years ago

1.0.7

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago