
Research
PyPI Package Disguised as Instagram Growth Tool Harvests User Credentials
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
prepend-http
Advanced tools
Prepend `https://` to humanized URLs like sindresorhus.com and localhost
The prepend-http npm package is a utility that ensures a URL has a protocol (http or https) prepended to it. This is useful for normalizing URLs and ensuring they are valid for HTTP requests.
Prepend HTTP to URL
This feature allows you to prepend 'http://' to a URL if it does not already have a protocol. This is useful for ensuring that URLs are valid for HTTP requests.
const prependHttp = require('prepend-http');
const url = 'example.com';
const fullUrl = prependHttp(url);
console.log(fullUrl); // 'http://example.com'
Prepend HTTPS to URL
This feature allows you to prepend 'https://' to a URL if it does not already have a protocol. This is useful for ensuring that URLs are secure.
const prependHttp = require('prepend-http');
const url = 'example.com';
const fullUrl = prependHttp(url, {https: true});
console.log(fullUrl); // 'https://example.com'
The normalize-url package is a more comprehensive solution for URL normalization. It not only ensures that a URL has a protocol, but also handles other aspects of URL normalization such as removing duplicate slashes, sorting query parameters, and more. It is more feature-rich compared to prepend-http.
The url-parse package is a robust URL parsing library that can handle a wide range of URL manipulations, including ensuring that a URL has a protocol. It provides more extensive parsing and manipulation capabilities compared to prepend-http.
Prepend
https://
to humanized URLs likesindresorhus.com
andlocalhost
$ npm install prepend-http
import prependHttp from 'prepend-http';
prependHttp('sindresorhus.com');
//=> 'https://sindresorhus.com'
prependHttp('localhost', {https: false});
//=> 'http://localhost'
prependHttp('https://sindresorhus.com');
//=> 'https://sindresorhus.com'
Type: string
The URL to prepend https://
to.
Type: object
Type: boolean
Default: true
Prepend https://
instead of http://
.
FAQs
Prepend `https://` to humanized URLs like sindresorhus.com and localhost
The npm package prepend-http receives a total of 10,843,181 weekly downloads. As such, prepend-http popularity was classified as popular.
We found that prepend-http demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.