Scan your whole stack
From OX Research Newsroom
Are you using path-is-same?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v1.0.30
path-is-same was last scanned on 27 Nov 2026 at version 1.0.30. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 1.0.30 LATEST | 27 Nov 2026 | No rules fired |
Findings for v1.0.30. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 1.0.30; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
這個模組提供了多種路徑比較功能,可以檢查多個路徑是否指向相同的檔案或目錄。
yarn add path-is-same
yarn-tool add path-is-same
yt add path-is-same
import pathIsSame from 'path-is-same';
// 檢查兩個路徑是否相同
const result = pathIsSame('/path/to/file', '/path/to/file');
console.log(result); // true
// 檢查多個路徑是否相同
const result2 = pathIsSame('/path/to/file', '/path/to/file', '/path/to/file');
console.log(result2); // true
檢查多個路徑是否相同。
參數:
p1 (string): 第一個路徑...ps (string[]): 其他路徑返回值:
boolean: 如果所有路徑相同則返回 true,否則返回 false檢查多個路徑是否指向相同的實體檔案。
參數:
p1 (string): 第一個路徑...ps (string[]): 其他路徑返回值:
boolean: 如果所有路徑指向相同的實體檔案則返回 true,否則返回 false內部函數:檢查兩個路徑是否相同。
參數:
p1 (string): 第一個路徑p2 (string): 第二個路徑返回值:
boolean: 如果路徑相同則返回 true,否則返回 false內部函數:檢查輸入參數是否有效。
參數:
p1 (string): 第一個路徑...ps (string[]): 其他路徑拋出:
TypeError: 如果沒有提供足夠的路徑參數import pathIsSame from 'path-is-same';
// 檢查相對路徑
console.log(pathIsSame('./file.txt', './file.txt')); // true
// 檢查絕對路徑
console.log(pathIsSame('/home/user/file.txt', '/home/user/file.txt')); // true
// 檢查不同路徑
console.log(pathIsSame('/path/to/file', '/different/path/file')); // false
import { fsSameRealpath } from 'path-is-same';
// 檢查符號連結是否指向相同檔案
console.log(fsSameRealpath('/path/to/link1', '/path/to/link2')); // true/false
// 檢查硬連結是否指向相同檔案
console.log(fsSameRealpath('/path/to/hardlink1', '/path/to/hardlink2')); // true/false
import pathIsSame from 'path-is-same';
// 檢查多個路徑是否都相同
const paths = ['/path/to/file', '/path/to/file', '/path/to/file'];
console.log(pathIsSame(...paths)); // true
// 檢查多個路徑是否不完全相同
const differentPaths = ['/path/to/file1', '/path/to/file2', '/path/to/file3'];
console.log(pathIsSame(...differentPaths)); // false
歡迎提交問題和拉取請求!
ISC
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.