keksAccountGUI/node_modulesOLD/prepend-http
Kekskurse 8e5ce9e324 Update Framework 2019-08-11 20:48:02 +02:00
..
index.js Update Framework 2019-08-11 20:48:02 +02:00
license Update Framework 2019-08-11 20:48:02 +02:00
package.json Update Framework 2019-08-11 20:48:02 +02:00
readme.md Update Framework 2019-08-11 20:48:02 +02:00

readme.md

prepend-http Build Status

Prepend http:// to humanized URLs like todomvc.com and localhost

Install

$ npm install prepend-http

Usage

const prependHttp = require('prepend-http');

prependHttp('todomvc.com');
//=> 'http://todomvc.com'

prependHttp('localhost');
//=> 'http://localhost'

prependHttp('http://todomvc.com');
//=> 'http://todomvc.com'

prependHttp('todomvc.com', {https: true});
//=> 'https://todomvc.com'

API

prependHttp(url, [options])

url

Type: string

URL to prepend http:// on.

options

Type: Object

https

Type: boolean
Default: false

Prepend https:// instead of http://.

License

MIT © Sindre Sorhus