resolve-pathname
Advanced tools
Comparing version 2.0.2 to 2.1.0
@@ -16,3 +16,3 @@ 'use strict'; | ||
var resolvePathname = function resolvePathname(to) { | ||
var from = arguments.length <= 1 || arguments[1] === undefined ? '' : arguments[1]; | ||
var from = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; | ||
@@ -19,0 +19,0 @@ var toParts = to && to.split('/') || []; |
{ | ||
"name": "resolve-pathname", | ||
"version": "2.0.2", | ||
"version": "2.1.0", | ||
"description": "Resolve URL pathnames using JavaScript", | ||
"repository": "mjackson/resolve-pathname", | ||
"license": "MIT", | ||
"author": "Michael Jackson", | ||
"license": "MIT", | ||
"files": [ | ||
"es", | ||
"index.js", | ||
"umd" | ||
], | ||
"scripts": { | ||
"build": "node ./tools/build.js", | ||
"prepublish": "node ./tools/build.js", | ||
"clean": "git clean -fdX .", | ||
"release": "node ./tools/release.js", | ||
"lint": "eslint modules", | ||
"build": "node ./scripts/build.js", | ||
"build-cjs": "babel ./modules -d . --ignore '__tests__'", | ||
"build-min": "NODE_ENV=production webpack -p modules/index.js umd/resolve-pathname.min.js", | ||
"build-umd": "NODE_ENV=production webpack modules/index.js umd/resolve-pathname.js", | ||
"release": "node ./scripts/release.js", | ||
"prepublish": "npm run build", | ||
"test": "npm run lint && karma start" | ||
"test": "karma start --single-run" | ||
}, | ||
@@ -24,3 +27,3 @@ "devDependencies": { | ||
"babel-preset-es2015": "^6.5.0", | ||
"babel-preset-es2015-loose": "^8.0.0", | ||
"babel-preset-stage-1": "^6.24.1", | ||
"eslint": "^3.2.2", | ||
@@ -30,2 +33,3 @@ "eslint-plugin-import": "^2.0.0", | ||
"gzip-size": "^3.0.0", | ||
"in-publish": "^2.0.0", | ||
"karma": "^1.1.2", | ||
@@ -32,0 +36,0 @@ "karma-browserstack-launcher": "^1.0.0", |
@@ -55,3 +55,3 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
/* 0 */ | ||
/***/ function(module, exports) { | ||
/***/ (function(module, exports) { | ||
@@ -73,3 +73,3 @@ 'use strict'; | ||
var resolvePathname = function resolvePathname(to) { | ||
var from = arguments.length <= 1 || arguments[1] === undefined ? '' : arguments[1]; | ||
var from = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; | ||
@@ -130,5 +130,5 @@ var toParts = to && to.split('/') || []; | ||
/***/ } | ||
/***/ }) | ||
/******/ ]) | ||
}); | ||
; |
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.resolvePathname=e():t.resolvePathname=e()}(this,function(){return function(t){function e(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e){"use strict";var r=function(t){return"/"===t.charAt(0)},n=function(t,e){for(var r=e,n=r+1,o=t.length;n<o;r+=1,n+=1)t[r]=t[n];t.pop()},o=function(t){var e=arguments.length<=1||void 0===arguments[1]?"":arguments[1],o=t&&t.split("/")||[],i=e&&e.split("/")||[],f=t&&r(t),s=e&&r(e),u=f||s;if(t&&r(t)?i=o:o.length&&(i.pop(),i=i.concat(o)),!i.length)return"/";var p=void 0;if(i.length){var a=i[i.length-1];p="."===a||".."===a||""===a}else p=!1;for(var c=0,l=i.length;l>=0;l--){var v=i[l];"."===v?n(i,l):".."===v?(n(i,l),c++):c&&(n(i,l),c--)}if(!u)for(;c--;c)i.unshift("..");!u||""===i[0]||i[0]&&r(i[0])||i.unshift("");var d=i.join("/");return p&&"/"!==d.substr(-1)&&(d+="/"),d};t.exports=o}])}); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.resolvePathname=e():t.resolvePathname=e()}(this,function(){return function(t){function e(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e){"use strict";var r=function(t){return"/"===t.charAt(0)},n=function(t,e){for(var r=e,n=r+1,o=t.length;n<o;r+=1,n+=1)t[r]=t[n];t.pop()},o=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=t&&t.split("/")||[],i=e&&e.split("/")||[],f=t&&r(t),s=e&&r(e),u=f||s;if(t&&r(t)?i=o:o.length&&(i.pop(),i=i.concat(o)),!i.length)return"/";var p=void 0;if(i.length){var a=i[i.length-1];p="."===a||".."===a||""===a}else p=!1;for(var c=0,l=i.length;l>=0;l--){var v=i[l];"."===v?n(i,l):".."===v?(n(i,l),c++):c&&(n(i,l),c--)}if(!u)for(;c--;c)i.unshift("..");!u||""===i[0]||i[0]&&r(i[0])||i.unshift("");var d=i.join("/");return p&&"/"!==d.substr(-1)&&(d+="/"),d};t.exports=o}])}); |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
12313
7
209
0
22