@jupyterlab/coreutils
Advanced tools
Comparing version 1.0.6 to 1.0.7
@@ -47,2 +47,6 @@ import { JSONObject } from '@phosphor/coreutils'; | ||
* Test whether the url is a local url. | ||
* | ||
* #### Notes | ||
* This function returns `false` for any fully qualified url, including | ||
* `data:`, `file:`, and `//` protocol URLs. | ||
*/ | ||
@@ -49,0 +53,0 @@ function isLocal(url: string): boolean; |
@@ -87,8 +87,12 @@ "use strict"; | ||
* Test whether the url is a local url. | ||
* | ||
* #### Notes | ||
* This function returns `false` for any fully qualified url, including | ||
* `data:`, `file:`, and `//` protocol URLs. | ||
*/ | ||
function isLocal(url) { | ||
var _a = parse(url), host = _a.host, protocol = _a.protocol; | ||
return protocol !== 'data:' && host === location.host || host === ''; | ||
var protocol = parse(url).protocol; | ||
return url.toLowerCase().indexOf(protocol) !== 0 && url.indexOf('//') !== 0; | ||
} | ||
URLExt.isLocal = isLocal; | ||
})(URLExt = exports.URLExt || (exports.URLExt = {})); |
{ | ||
"name": "@jupyterlab/coreutils", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "JupyterLab - Core Utilities", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/jupyterlab/jupyterlab", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
232388
3482