|
|
4 jaren geleden | |
|---|---|---|
| .. | ||
| index.js | 4 jaren geleden | |
| license | 4 jaren geleden | |
| package.json | 4 jaren geleden | |
| readme.md | 4 jaren geleden | |
Prepend
http://to humanized URLs liketodomvc.comandlocalhost
$ npm install prepend-http
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'
Type: string
URL to prepend http:// on.
Type: Object
Type: boolean
Default: false
Prepend https:// instead of http://.
MIT © Sindre Sorhus