Socket
Socket
Sign inDemoInstall

is-absolute-url

Package Overview
Dependencies
0
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.0 to 3.0.1

2

index.d.ts
/**
Check if an URL is absolute.
Check if a URL is absolute.

@@ -4,0 +4,0 @@ @param url - The URL to check.

@@ -8,3 +8,10 @@ 'use strict';

return /^[a-z][a-z\d+.-]*:/.test(url);
// Don't match Windows paths `c:\`
if (/^[a-z]:\\/.test(url)) {
return false;
}
// Scheme: https://tools.ietf.org/html/rfc3986#section-3.1
// Absolute URL: https://tools.ietf.org/html/rfc3986#section-4.3
return /^[a-z][a-z\d+-.]*:/.test(url);
};
{
"name": "is-absolute-url",
"version": "3.0.0",
"description": "Check if an URL is absolute",
"version": "3.0.1",
"description": "Check if a URL is absolute",
"license": "MIT",

@@ -6,0 +6,0 @@ "repository": "sindresorhus/is-absolute-url",

# is-absolute-url [![Build Status](https://travis-ci.org/sindresorhus/is-absolute-url.svg?branch=master)](https://travis-ci.org/sindresorhus/is-absolute-url)
> Check if an URL is absolute
> Check if a URL is absolute

@@ -5,0 +5,0 @@

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