path-is-same
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -6,2 +6,13 @@ # Change Log | ||
## [1.0.4](https://github.com/bluelovers/ws-iconv/compare/path-is-same@1.0.3...path-is-same@1.0.4) (2020-06-25) | ||
### 🐛 Bug Fixes | ||
* use `relative` for check ([e5b0b91](https://github.com/bluelovers/ws-iconv/commit/e5b0b9139ee34b48300c5ac8309e8f0e8366209e)) | ||
## [1.0.3](https://github.com/bluelovers/ws-iconv/compare/path-is-same@1.0.2...path-is-same@1.0.3) (2020-06-25) | ||
@@ -8,0 +19,0 @@ |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.pathIsSame = void 0; | ||
const path_dir_normalize_1 = require("path-dir-normalize"); | ||
const path_1 = require("path"); | ||
function pathIsSame(p1, ...ps) { | ||
p1 = path_dir_normalize_1.pathDirNormalize(p1); | ||
if (ps.length <= 0) { | ||
throw new TypeError(`p2 must be protected`); | ||
} | ||
return ps.every(p2 => path_dir_normalize_1.pathDirNormalize(p2) === p1); | ||
return ps.every(p2 => path_1.relative(p1, p2) === ''); | ||
} | ||
@@ -12,0 +11,0 @@ exports.pathIsSame = pathIsSame; |
{ | ||
"name": "path-is-same", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "", | ||
@@ -32,6 +32,3 @@ "homepage": "https://github.com/bluelovers/ws-iconv/tree/master/packages/path-is-same#readme", | ||
}, | ||
"dependencies": { | ||
"path-dir-normalize": "^1.0.14" | ||
}, | ||
"gitHead": "325f3241d8bbcd554e52523448ec21b99350ab14" | ||
"gitHead": "97e13e0cfa2a7c5463a4d9ed557ea9a4fc83b52a" | ||
} |
Sorry, the diff of this file is not supported yet
3669
0
14
- Removedpath-dir-normalize@^1.0.14
- Removed@types/node@22.13.8(transitive)
- Removedpath-dir-normalize@1.0.30(transitive)
- Removedpath-is-network-drive@1.0.21(transitive)
- Removedpath-strip-sep@1.0.18(transitive)
- Removedtslib@2.8.1(transitive)
- Removedundici-types@6.20.0(transitive)
- Removedupath2@3.1.20(transitive)