• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# prepend-http [![Build Status](https://travis-ci.org/sindresorhus/prepend-http.svg?branch=master)](https://travis-ci.org/sindresorhus/prepend-http)
2
3> Prepend `http://` to humanized URLs like `todomvc.com` and `localhost`
4
5
6## Install
7
8```
9$ npm install --save prepend-http
10```
11
12
13## Usage
14
15```js
16const prependHttp = require('prepend-http');
17
18prependHttp('todomvc.com');
19//=> 'http://todomvc.com'
20
21prependHttp('localhost');
22//=> 'http://localhost'
23
24prependHttp('http://todomvc.com');
25//=> 'http://todomvc.com'
26```
27
28
29## License
30
31MIT © [Sindre Sorhus](https://sindresorhus.com)
32