Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

original

Package Overview
Dependencies
Maintainers
3
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

original

Generate the origin from an URL or check if two URL/Origins are the same

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created

What is original?

The 'original' npm package is designed to provide utilities for handling URL normalization and comparison. It helps in managing and comparing URLs by normalizing them to a base form, making it easier to handle different URL formats and variations in a consistent manner.

What are original's main functionalities?

URL Normalization

This feature allows the normalization of URLs to a standard format by removing default ports, unnecessary slashes, and making the hostname lowercase.

const original = require('original');
const normalizedUrl = original('http://www.example.com:80/path');
console.log(normalizedUrl); // Outputs: 'http://example.com/path'

URL Comparison

Enables the comparison of different URLs by normalizing them into a consistent format, thus facilitating accurate comparisons.

const original = require('original');
const url1 = original('http://example.com/path');
const url2 = original('http://example.com/path/');
console.log(url1 === url2); // Outputs: true

Other packages similar to original

Keywords

FAQs

Package last updated on 06 Aug 2018

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc