Big update!Announcing Socket for GitHub 1.0. Learn more
Socket
BlogLoveFAQ
Install
Log in

prepend-http

Package Overview
Dependencies
0
Maintainers
1
Versions
9
Issues
File Explorer

Advanced tools

prepend-http

Prepend `https://` to humanized URLs like sindresorhus.com and localhost

    4.0.0latest

Version published
Maintainers
1
Weekly downloads
17,035,502
decreased by-5.33%

Weekly downloads

Changelog

Source

Breaking

  • Require Node.js 12.20 32f2464
  • This package is now pure ESM. Please read this.

https://github.com/sindresorhus/prepend-http/compare/v3.0.1...v4.0.0

Readme

Source

prepend-http

Prepend https:// to humanized URLs like sindresorhus.com and localhost

Install

$ npm install prepend-http

Usage

import prependHttp from 'prepend-http'; prependHttp('sindresorhus.com'); //=> 'https://sindresorhus.com' prependHttp('localhost', {https: false}); //=> 'http://localhost' prependHttp('https://sindresorhus.com'); //=> 'https://sindresorhus.com'

API

prependHttp(url, options?)

url

Type: string

The URL to prepend https:// to.

options

Type: object

https

Type: boolean
Default: true

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


Get professional support for this package with a Tidelift subscription
Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies.

Keywords

FAQs

What is prepend-http?

Prepend `https://` to humanized URLs like sindresorhus.com and localhost

Is prepend-http popular?

The npm package prepend-http receives a total of 16,164,584 weekly downloads. As such, prepend-http popularity was classified as popular.

Is prepend-http well maintained?

We found that prepend-http demonstrated a not healthy version release cadence and project activity. It has 1 open source maintainer collaborating on the project.

Last updated on 09 Aug 2021
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc