prepend-http-extra

1.0.0 • Public • Published

prepend-http-extra npmjs.com The MIT License

Same as prepend-http but handles the case when starts with //, like CDNs.

code climate standard code style travis build status coverage status dependency status

Install

npm i prepend-http-extra --save

Usage

For more use-cases see the tests

const prepend = require('prepend-http-extra')
 
prepend('https://foo.com')  // => 'https://foo.com'
prepend('http://bar.com')   // => 'http://bar.com'
prepend('baz.com')          // => 'http://baz.com'
prepend('//qux.com')        // => 'http://qux.com'
prepend('/abs.com')         // => '/abs.com'
prepend('./rel.com')        // => './rel.com'
prepend('../par.com')       // => '../par.com'

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
But before doing anything, please read the CONTRIBUTING.md guidelines.

Charlike Make Reagent new message to charlike freenode #charlike

tunnckocore.tk keybase tunnckocore tunnckoCore npm tunnckoCore twitter tunnckoCore github

Package Sidebar

Install

npm i prepend-http-extra

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • vanchoy
  • tunnckocore