|
|
před 5 roky | |
|---|---|---|
| .. | ||
| index.js | před 5 roky | |
| license | před 5 roky | |
| package.json | před 5 roky | |
| readme.md | před 5 roky | |
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