@jsenv/module-resolution
Advanced tools
Comparing version 3.0.0 to 3.1.0
@@ -100,3 +100,3 @@ 'use strict'; | ||
var pathnameSlashIndex = afterProtocol.indexOf("/", "://".length); | ||
return afterProtocol.slice(pathnameSlashIndex); | ||
return ressourceToPathname(afterProtocol.slice(pathnameSlashIndex)); | ||
} | ||
@@ -107,2 +107,7 @@ | ||
var ressourceToPathname = function ressourceToPathname(ressource) { | ||
var searchSeparatorIndex = ressource.indexOf("?"); | ||
return searchSeparatorIndex === -1 ? ressource : ressource.slice(0, searchSeparatorIndex); | ||
}; | ||
var pathnameToDirname = function pathnameToDirname(pathname) { | ||
@@ -109,0 +114,0 @@ var slashLastIndex = pathname.lastIndexOf("/"); |
@@ -99,3 +99,3 @@ var __dmail_assert__ = function (exports) { | ||
var pathnameSlashIndex = afterProtocol.indexOf("/", "://".length); | ||
return afterProtocol.slice(pathnameSlashIndex); | ||
return ressourceToPathname(afterProtocol.slice(pathnameSlashIndex)); | ||
} | ||
@@ -106,2 +106,7 @@ | ||
var ressourceToPathname = function ressourceToPathname(ressource) { | ||
var searchSeparatorIndex = ressource.indexOf("?"); | ||
return searchSeparatorIndex === -1 ? ressource : ressource.slice(0, searchSeparatorIndex); | ||
}; | ||
var pathnameToDirname = function pathnameToDirname(pathname) { | ||
@@ -108,0 +113,0 @@ var slashLastIndex = pathname.lastIndexOf("/"); |
{ | ||
"name": "@jsenv/module-resolution", | ||
"version": "3.0.0", | ||
"version": "3.1.0", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -11,4 +11,4 @@ # jsenv module resolution | ||
jsenv use its own import resolution mostly because it uses some features not fully available in systemjs and rollup.<br /> | ||
It uses `resolvePath` function exported here. | ||
This module exports a `resolvePath` you can use to resolve an import.<br /> | ||
It is used by jsenv to find every import statement files. | ||
@@ -15,0 +15,0 @@ ## Installation |
@@ -14,3 +14,3 @@ import { hrefToScheme } from "./hrefToScheme.js" | ||
const pathnameSlashIndex = afterProtocol.indexOf("/", "://".length) | ||
return afterProtocol.slice(pathnameSlashIndex) | ||
return ressourceToPathname(afterProtocol.slice(pathnameSlashIndex)) | ||
} | ||
@@ -20,1 +20,6 @@ | ||
} | ||
const ressourceToPathname = (ressource) => { | ||
const searchSeparatorIndex = ressource.indexOf("?") | ||
return searchSeparatorIndex === -1 ? ressource : ressource.slice(0, searchSeparatorIndex) | ||
} |
Sorry, the diff of this file is not supported yet
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
68270
1023