Socket
Socket
Sign inDemoInstall

@jupyterlab/coreutils

Package Overview
Dependencies
Maintainers
10
Versions
350
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jupyterlab/coreutils - npm Package Compare versions

Comparing version 6.1.0-beta.0 to 6.1.0-beta.1

4

lib/url.d.ts

@@ -68,2 +68,4 @@ import { PartialJSONObject } from '@lumino/coreutils';

*
* @param allowRoot - Whether the paths starting at Unix-style filesystem root (`/`) are permitted.
*
* #### Notes

@@ -73,3 +75,3 @@ * This function returns `false` for any fully qualified url, including

*/
function isLocal(url: string): boolean;
function isLocal(url: string, allowRoot?: boolean): boolean;
/**

@@ -76,0 +78,0 @@ * The interface for a URL object

@@ -126,2 +126,4 @@ "use strict";

*
* @param allowRoot - Whether the paths starting at Unix-style filesystem root (`/`) are permitted.
*
* #### Notes

@@ -131,6 +133,6 @@ * This function returns `false` for any fully qualified url, including

*/
function isLocal(url) {
function isLocal(url, allowRoot = false) {
const { protocol } = parse(url);
return ((!protocol || url.toLowerCase().indexOf(protocol) !== 0) &&
url.indexOf('/') !== 0);
(allowRoot ? url.indexOf('//') !== 0 : url.indexOf('/') !== 0));
}

@@ -137,0 +139,0 @@ URLExt.isLocal = isLocal;

{
"name": "@jupyterlab/coreutils",
"version": "6.1.0-beta.0",
"version": "6.1.0-beta.1",
"description": "JupyterLab - Core Utilities",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/jupyterlab/jupyterlab",

@@ -144,2 +144,4 @@ // Copyright (c) Jupyter Development Team.

*
* @param allowRoot - Whether the paths starting at Unix-style filesystem root (`/`) are permitted.
*
* #### Notes

@@ -149,3 +151,3 @@ * This function returns `false` for any fully qualified url, including

*/
export function isLocal(url: string): boolean {
export function isLocal(url: string, allowRoot: boolean = false): boolean {
const { protocol } = parse(url);

@@ -155,3 +157,3 @@

(!protocol || url.toLowerCase().indexOf(protocol) !== 0) &&
url.indexOf('/') !== 0
(allowRoot ? url.indexOf('//') !== 0 : url.indexOf('/') !== 0)
);

@@ -158,0 +160,0 @@ }

Sorry, the diff of this file is not supported yet

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