prepend-http

WebJar for prepend-http

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

prepend-http
Last Version

Last Version

2.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

prepend-http
WebJar for prepend-http
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/sindresorhus/prepend-http

Download prepend-http

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/prepend-http/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>prepend-http</artifactId>
    <version>2.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/prepend-http/
implementation 'org.webjars.npm:prepend-http:2.0.0'
// https://jarcasting.com/artifacts/org.webjars.npm/prepend-http/
implementation ("org.webjars.npm:prepend-http:2.0.0")
'org.webjars.npm:prepend-http:jar:2.0.0'
<dependency org="org.webjars.npm" name="prepend-http" rev="2.0.0">
  <artifact name="prepend-http" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='prepend-http', version='2.0.0')
)
libraryDependencies += "org.webjars.npm" % "prepend-http" % "2.0.0"
[org.webjars.npm/prepend-http "2.0.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

prepend-http

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

Install

$ npm install prepend-http

Usage

const prependHttp = require('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

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.

Versions

Version
2.0.0
1.0.4
1.0.1
1.0.0