npm

Check out our latest tech talk, "JavaScript Supply Chain Security" presented by VP of Security, Adam Baldwin.Watch it here »

full-url

1.0.0 • Public • Published

full-url

full-url is a function that returns the full URL of a request, including the scheme and host.

Build status

Browser support

Install

npm install full-url

Example

node

var server = require('http').createServer
var url = require('full-url')
 
server(function(request, response) {
  url(request)
  // => http://localhost:1234/[wherever]
  
  response.end()
}).listen(1234)

browser(ify)

var url = require('full-url')
var path = '[wherever]' || '/path/to/resource'
 
url(path)
// => http://whenev.er/[wherever]

License

MIT

install

npm i full-url

Downloadsweekly downloads

210

version

1.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability