Socket
Socket
Sign inDemoInstall

url-http

Package Overview
Dependencies
95
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    url-http

Get input as normalized WHATWG URL


Version published
Weekly downloads
37K
decreased by-2.53%
Maintainers
1
Install size
46.5 MB
Created
Weekly downloads
 

Changelog

Source

1.2.0 (2024-02-14)

Features

  • handle punycode URLs (#13) (b0bde42)

Readme

Source

url-http

Last version Coverage Status NPM Status

Get input as normalized WHATWG URL.

Install

$ npm install url-http --save

Usage

const urlHttp = require('url-http')

!!urlHttp('https://kikobeats.com') // ==> true
!!urlHttp('https://kikobeats.com') // ==> true
!!urlHttp('mailto://kiko@beats.com') // ==> false
!!urlHttp('callto:192.168.103.77+type=ip') // ==> false

If you need to run the package in a browser environment, you can save some bytes using the lightweight version:

const urlHttp = require('url-http/lightweight')

!!urlHttp('https://kikobeats.com') // ==> true
!!urlHttp('https://kikobeats.com') // ==> true
!!urlHttp('mailto://kiko@beats.com') // ==> false
!!urlHttp('callto:192.168.103.77+type=ip') // ==> false

License

url-http © Kiko Beats, released under the MIT License.
Authored and maintained by Kiko Beats with help from contributors.

kikobeats.com · GitHub Kiko Beats · Twitter @Kikobeats

Keywords

FAQs

Last updated on 14 Feb 2024

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc