Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sebastiandg7/prepend-http
Prepend `https://` to humanized URLs like `sindresorhus.com` and `localhost` - Forked from https://github.com/sindresorhus/prepend-http
https://github.com/sebastiandg7/prepend-http
Last synced: 14 days ago
JSON representation
Prepend `https://` to humanized URLs like `sindresorhus.com` and `localhost` - Forked from https://github.com/sindresorhus/prepend-http
- Host: GitHub
- URL: https://github.com/sebastiandg7/prepend-http
- Owner: sebastiandg7
- License: mit
- Created: 2022-04-06T21:02:47.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-04-06T21:33:05.000Z (over 2 years ago)
- Last Synced: 2024-10-11T04:46:57.042Z (about 1 month ago)
- Language: TypeScript
- Homepage:
- Size: 56.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Prepend HTTP
(Forked from [sindresorhus/prepend-http](https://github.com/sindresorhus/prepend-http))
## Install
`npm install @sebastiandg7/prepend-http`
or
`yarn add @sebastiandg7/prepend-http`
or
`pnpm install @sebastiandg7/prepend-http`
## Usage
```typescript
import { prependHttp } from '@sebastiandg7/prepend-http';prependHttp('sindresorhus.com');
//=> 'https://sindresorhus.com'prependHttp('localhost', { https: false });
//=> 'http://localhost'prependHttp('https://sindresorhus.com');
//=> 'https://sindresorhus.com'
```