{"name":"upath2","version":"3.1.23","keywords":["absolute","backslash","check","core","detect","dir","file","filepath","fix","forward","fp","fs","is","is-absolute","isabsolute","normalize","path","paths","sep","shim","slash","slashes","trailing","unix","urix","util","utils","win32","windows"],"author":{"name":"bluelovers"},"license":"ISC","_id":"upath2@3.1.23","maintainers":[{"name":"bluelovers","email":"codelovers@users.sourceforge.net"}],"homepage":"https://github.com/bluelovers/ws-iconv/tree/master/packages/upath2#readme","bugs":{"url":"https://github.com/bluelovers/ws-iconv/issues"},"dist":{"shasum":"ec85f2cf69805e3dbbbc2b24a1092518e88beefc","tarball":"http://registry-npm.ywwl.com/upath2/download/upath2-3.1.23.tgz","fileCount":21,"integrity":"sha512-HQ7CivlKonWnq7m7VZuZHIDXXUCHOoCoIqgVyCk/z/wsuB/agGwGFhFjGSTArGlvBddiejrW4ChW6SwEMhAURQ==","signatures":[{"sig":"MEYCIQC6XEjVFqZAaXS59EGLdlzCIihqYZhPliNvfQPoNlkIXwIhAMezXnViLBpCDDETaq+CQKNnabK5Y8UC9IEN6uj5mEgW","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":53952,"size":13697,"noattachment":false,"key":"/upath2/-/upath2-3.1.23.tgz"},"main":"index.js","types":"./index.d.ts","gitHead":"b3974c1f5bf98e50fca3e403453837fc8e681230","scripts":{"ncu":"yarn-tool ncu -u","test":"jest","coverage":"yarn run test -- --coverage","test:tsd":"ynpx tsd","test:jest":"jest --passWithNoTests","preversion":"yarn run test","npm:publish":"npm publish","postpublish_":"git commit -m \"chore(release): publish\" .","test:snapshot":"yarn run test -- -u","tsc:showConfig":"ynpx get-current-tsconfig -p","npm:publish:lerna":"lerna publish --yes --cd-version patch","sort-package-json":"yarn-tool sort","test:jest:coverage":"yarn run test:jest -- --coverage","test:jest:snapshot":"yarn run test:jest -- -u","prepublish:lockfile":"ynpx sync-lockfile ."},"_npmUser":{"name":"bluelovers","email":"codelovers@users.sourceforge.net"},"repository":{"url":"git+https://github.com/bluelovers/ws-iconv.git","type":"git","directory":"packages/upath2"},"_npmVersion":"lerna/6.6.2/node@v24.13.1+x64 (win32)","description":"A proxy to `path`, replacing `\\` with `/` for all results","directories":{"lib":"lib","test":"test"},"_nodeVersion":"24.13.1","dependencies":{"tslib":"^2","@types/node":"*","path-strip-sep":"^1.0.21","@lazy-node/types-path":"^1.0.3","path-is-network-drive":"^1.0.24"},"_hasShrinkwrap":false,"devDependencies":{"upath":"^2.0.1"},"_npmOperationalInternal":{"tmp":"tmp/upath2_3.1.23_1772417710401_0.6643794130629261","host":"s3://npm-registry-packages-npm-production"},"readme":"# upath2 - 跨平台路徑處理工具\n\n![](https://david-dm.org/bluelovers/node-upath2.svg)\n\n> 一個 `path` 的代理，將所有結果中的反斜線 (`\\`) 替換為正斜線 (`/`)，從而實現跨平台的路徑處理。\n\n## 主要功能\n\n- 跨平台路徑處理\n- 自動替換反斜線為正斜線\n- 完全相容於 Node.js path 模組\n- 支援 Windows 和 POSIX 平台\n- 內建網路磁碟機路徑處理\n\n## 安裝\n\n```bash\nnpm install upath2\n```\n\n## 快速開始\n\n## 使用方式\n\n### 匯入模組\n\n```ts\nimport * as upath from 'upath2';\n```\n\n### 基本使用\n\n```ts\n// 原來使用 path\nimport * as path from 'path';\n\n// 改用 upath2\nimport * as upath from 'upath2';\n```\n\nupath2 完全相容於 Node.js path 模組的 API，可以無縫替換。\n\n### 跨平台路徑處理\n\n```ts\n// Windows 路徑\nconst winPath = upath.join('C:\\\\Users\\\\User\\\\Documents', 'file.txt');\nconsole.log(winPath); // 'C:/Users/User/Documents/file.txt'\n\n// POSIX 路徑\nconst posixPath = upath.join('/home/user', 'documents', 'file.txt');\nconsole.log(posixPath); // '/home/user/documents/file.txt'\n```\n\n","publish_time":1772417710585,"_cnpm_publish_time":1772417710585,"dist-tags":{"latest":"3.1.25"}}