{"_id":"@arcmantle/posix-path-browser","_rev":"4-0d724157b855f38ca82b30af5324e694","name":"@arcmantle/posix-path-browser","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"@arcmantle/posix-path-browser","version":"1.0.0","author":{"name":"Kristoffer Roen-Lie"},"license":"Apache-2.0","_id":"@arcmantle/posix-path-browser@1.0.0","maintainers":[{"name":"roenlie","email":"kristofferroenlie@gmail.com"}],"dist":{"shasum":"0f3dd19be5d63f2cbe1894ac19efae5723490108","tarball":"https://registry.npmjs.org/@arcmantle/posix-path-browser/-/posix-path-browser-1.0.0.tgz","fileCount":13,"integrity":"sha512-cgi4R9yJQVfcOmzMPXz8d4EZmgZcTaK+ZaDyelO1j2oj6DOQlkPzk7Ll4p0ttzOcBj77cJg8tPaVbbG25fAHBw==","signatures":[{"sig":"MEYCIQDpSbiJf960P5Ul9E2uy7/SWxwDWBfrA+DRwpcmc5GipgIhAPa30PHXQD6yjRnRT33xDhV3znLb45BW5CGdG0HneC3P","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":71473},"main":"./dist/index.js","type":"module","_from":"file:arcmantle-posix-path-browser-1.0.0.tgz","types":"./dist/index.d.ts","exports":{".":"./dist/index.js"},"scripts":{"build":"rimraf dist && tsc --project ./src/tsconfig.json"},"_npmUser":{"name":"roenlie","actor":{"name":"roenlie","type":"user","email":"kristofferroenlie@gmail.com"},"email":"kristofferroenlie@gmail.com"},"_resolved":"/tmp/e0004304221083ba9d357f54b0156a02/arcmantle-posix-path-browser-1.0.0.tgz","_integrity":"sha512-cgi4R9yJQVfcOmzMPXz8d4EZmgZcTaK+ZaDyelO1j2oj6DOQlkPzk7Ll4p0ttzOcBj77cJg8tPaVbbG25fAHBw==","_npmVersion":"11.4.2","description":"Browser friendly version of nodejs path posix implementation.","directories":{},"sideEffects":false,"_nodeVersion":"24.3.0","_hasShrinkwrap":false,"devDependencies":{"rimraf":"^6.0.1","typescript":"^5.8.3","@types/node":"^24.0.10","@arcmantle/tsconfig":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/posix-path-browser_1.0.0_1751579565474_0.5940442120875835","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@arcmantle/posix-path-browser","version":"1.0.1","author":{"name":"Kristoffer Roen-Lie"},"license":"Apache-2.0","_id":"@arcmantle/posix-path-browser@1.0.1","maintainers":[{"name":"roenlie","email":"kristofferroenlie@gmail.com"}],"dist":{"shasum":"bd56e763d6db7fa0dc890b926f1f5d96d7172634","tarball":"https://registry.npmjs.org/@arcmantle/posix-path-browser/-/posix-path-browser-1.0.1.tgz","fileCount":13,"integrity":"sha512-hzchkpBFZDACXJCYSZljam6xGoYorzTvlzRQkBvCB2O3RVZg71qrC55jZcjQqLjYH4GUcKWhQE7wVw9COAywSA==","signatures":[{"sig":"MEUCIAzAsRM6hp3kNVjnB7xoeOUJcKdYOBKprma62fq5f2hFAiEAiAaRgu3UlKJtRLXxfaA6oAYsWaUPkpZ2l9bLJfhXZLI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":71455},"main":"./dist/index.js","type":"module","_from":"file:arcmantle-posix-path-browser-1.0.1.tgz","types":"./dist/index.d.ts","exports":{".":"./dist/index.js"},"scripts":{"build":"rimraf dist && tsc --project ./src/tsconfig.json"},"_npmUser":{"name":"roenlie","email":"kristofferroenlie@gmail.com"},"_resolved":"/tmp/73d8a1515723fc13ac51830dcaf8365f/arcmantle-posix-path-browser-1.0.1.tgz","_integrity":"sha512-hzchkpBFZDACXJCYSZljam6xGoYorzTvlzRQkBvCB2O3RVZg71qrC55jZcjQqLjYH4GUcKWhQE7wVw9COAywSA==","_npmVersion":"11.4.2","description":"Browser friendly version of nodejs path posix implementation.","directories":{},"sideEffects":false,"_nodeVersion":"24.4.1","_hasShrinkwrap":false,"devDependencies":{"rimraf":"^6.0.1","typescript":"^5.8.3","@types/node":"^24.0.14","@arcmantle/tsconfig":"^1.0.5"},"_npmOperationalInternal":{"tmp":"tmp/posix-path-browser_1.0.1_1752757865412_0.16593381289979137","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@arcmantle/posix-path-browser","version":"1.0.2","author":{"name":"Kristoffer Roen-Lie"},"license":"Apache-2.0","_id":"@arcmantle/posix-path-browser@1.0.2","maintainers":[{"name":"roenlie","email":"kristofferroenlie@gmail.com"}],"homepage":"https://github.com/arcmantle/posix-path-browser#readme","bugs":{"url":"https://github.com/arcmantle/posix-path-browser/issues"},"dist":{"shasum":"2a7aee93363853ef3955d59eb84afd068b75d9ea","tarball":"https://registry.npmjs.org/@arcmantle/posix-path-browser/-/posix-path-browser-1.0.2.tgz","fileCount":13,"integrity":"sha512-D9/B6HC8wZnp34V9rxX8bGQYnxe2SblNVJHt/o2da5wNHaM9TOtRKGHgwfOP65ibq49BR46kyNMYuSL551/xog==","signatures":[{"sig":"MEUCIGwGWddKjlEUNv7P2lQzKITjlLsBYIKclUpje/c+KwsEAiEAk45HJHSNrgl4Cq7kG9a6o0yFJsas5cCD0AEWqqcqV9Y=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":71562},"main":"./dist/index.js","type":"module","_from":"file:arcmantle-posix-path-browser-1.0.2.tgz","types":"./dist/index.d.ts","exports":{".":"./dist/index.js"},"scripts":{"build":"rimraf dist && tsc --project ./src/tsconfig.json"},"_npmUser":{"name":"roenlie","email":"kristofferroenlie@gmail.com"},"_resolved":"/tmp/c43e86f9f9f5791335ecd0486631624d/arcmantle-posix-path-browser-1.0.2.tgz","_integrity":"sha512-D9/B6HC8wZnp34V9rxX8bGQYnxe2SblNVJHt/o2da5wNHaM9TOtRKGHgwfOP65ibq49BR46kyNMYuSL551/xog==","repository":{"url":"git+https://github.com/arcmantle/posix-path-browser.git","type":"git"},"_npmVersion":"11.4.2","description":"Browser friendly version of nodejs path posix implementation.","directories":{},"sideEffects":false,"_nodeVersion":"24.4.1","_hasShrinkwrap":false,"devDependencies":{"rimraf":"^6.0.1","typescript":"^5.8.3","@types/node":"^24.0.14","@arcmantle/tsconfig":"^1.0.6"},"_npmOperationalInternal":{"tmp":"tmp/posix-path-browser_1.0.2_1752781596971_0.45409447529458147","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@arcmantle/posix-path-browser","version":"1.0.3","description":"Browser friendly version of nodejs path posix implementation.","repository":{"type":"git","url":"git+https://github.com/arcmantle/posix-path-browser.git"},"license":"Apache-2.0","author":{"name":"Kristoffer Roen-Lie"},"sideEffects":false,"type":"module","exports":{".":"./dist/index.js"},"main":"./dist/index.js","types":"./dist/index.d.ts","devDependencies":{"@arcmantle/tsconfig":"^1.0.9","@types/node":"^24.0.14","rimraf":"^6.0.1","typescript":"^5.8.3"},"scripts":{"build":"rimraf dist && tsc --project ./src/tsconfig.json"},"_id":"@arcmantle/posix-path-browser@1.0.3","bugs":{"url":"https://github.com/arcmantle/posix-path-browser/issues"},"homepage":"https://github.com/arcmantle/posix-path-browser#readme","_integrity":"sha512-ViHhzwYWFHFOkMlsPbiioSqWI7bpg8EQow37vr+yHrRvoHaxdeTxbT1kSH2Qk2nIvo8+Nu2Q1n9qzdpRrnc5EQ==","_resolved":"/tmp/a2b9c6cb26ee9d7389f4d1f872dce6ab/arcmantle-posix-path-browser-1.0.3.tgz","_from":"file:arcmantle-posix-path-browser-1.0.3.tgz","_nodeVersion":"24.4.1","_npmVersion":"11.4.2","dist":{"integrity":"sha512-ViHhzwYWFHFOkMlsPbiioSqWI7bpg8EQow37vr+yHrRvoHaxdeTxbT1kSH2Qk2nIvo8+Nu2Q1n9qzdpRrnc5EQ==","shasum":"e208c19dcae96c61de7bcceabe1fa5e70b046cf4","tarball":"https://registry.npmjs.org/@arcmantle/posix-path-browser/-/posix-path-browser-1.0.3.tgz","fileCount":13,"unpackedSize":71562,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCLhxpNdqbm7n/ocvDoxO6uZ7y5S13YPjVrl+aMVG6+uwIhAJ0cyVZQ7Z+lOQOAoK3PObwHJTNOOkfDyBxqNLQ1ghGq"}]},"_npmUser":{"name":"roenlie","email":"kristofferroenlie@gmail.com"},"directories":{},"maintainers":[{"name":"roenlie","email":"kristofferroenlie@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/posix-path-browser_1.0.3_1752792935718_0.5380191406010264"},"_hasShrinkwrap":false}},"time":{"created":"2025-07-03T21:52:45.357Z","modified":"2025-07-17T22:55:36.128Z","1.0.0":"2025-07-03T21:52:45.651Z","1.0.1":"2025-07-17T13:11:05.589Z","1.0.2":"2025-07-17T19:46:37.183Z","1.0.3":"2025-07-17T22:55:35.906Z"},"bugs":{"url":"https://github.com/arcmantle/posix-path-browser/issues"},"author":{"name":"Kristoffer Roen-Lie"},"license":"Apache-2.0","homepage":"https://github.com/arcmantle/posix-path-browser#readme","repository":{"type":"git","url":"git+https://github.com/arcmantle/posix-path-browser.git"},"description":"Browser friendly version of nodejs path posix implementation.","maintainers":[{"name":"roenlie","email":"kristofferroenlie@gmail.com"}],"readme":"# @arcmantle/posix-path-browser\n\n[![npm version](https://badge.fury.io/js/@arcmantle%2Fposix-path-browser.svg)](https://badge.fury.io/js/@arcmantle%2Fposix-path-browser)\n\nA browser-friendly implementation of Node.js's POSIX path utilities. This package provides the same API and methods as the standard Node.js `path.posix` module, but optimized for browser environments without any Node.js dependencies.\n\n## Features\n\n- 🌐 **Browser Compatible**: No Node.js dependencies, works in all modern browsers\n- 📦 **Zero Dependencies**: Lightweight implementation with no external dependencies\n- 🔄 **Drop-in Replacement**: Same API as Node.js `path.posix` module\n- 🎯 **TypeScript Support**: Full TypeScript definitions included\n- ⚡ **Lightweight**: Minimal bundle size impact\n- 🧪 **Well Tested**: Based on Node.js's battle-tested path implementation\n\n## Installation\n\n### deno\n\n```bash\ndeno add @arcmantle/posix-path-browser\n```\n\n### pnpm 10.9+\n\n```bash\npnpm add @arcmantle/posix-path-browser\n```\n\n### yarn 4.9+\n\n```bash\nyarn add @arcmantle/posix-path-browser\n```\n\n## Usage\n\n```typescript\nimport {\n  join,\n  resolve,\n  normalize,\n  dirname,\n  basename,\n  extname,\n  relative,\n  isAbsolute,\n  parse,\n  format,\n  sep,\n  delimiter\n} from '@arcmantle/posix-path-browser';\n\n// Join paths\nconst fullPath = join('home', 'user', 'documents', 'file.txt');\n// → 'home/user/documents/file.txt'\n\n// Resolve to absolute path\nconst absolutePath = resolve('/home/user', '../admin', 'config.json');\n// → '/home/admin/config.json'\n\n// Normalize path\nconst normalized = normalize('/home/user/../user/./documents//file.txt');\n// → '/home/user/documents/file.txt'\n\n// Get directory name\nconst dir = dirname('/home/user/documents/file.txt');\n// → '/home/user/documents'\n\n// Get file name\nconst filename = basename('/home/user/documents/file.txt');\n// → 'file.txt'\n\n// Get file extension\nconst ext = extname('/home/user/documents/file.txt');\n// → '.txt'\n\n// Get relative path\nconst rel = relative('/home/user', '/home/user/documents/file.txt');\n// → 'documents/file.txt'\n\n// Check if path is absolute\nconst isAbs = isAbsolute('/home/user');\n// → true\n\n// Parse path into components\nconst parsed = parse('/home/user/documents/file.txt');\n// → {\n//     root: '/',\n//     dir: '/home/user/documents',\n//     base: 'file.txt',\n//     ext: '.txt',\n//     name: 'file'\n//   }\n\n// Format path from components\nconst formatted = format({\n  dir: '/home/user/documents',\n  name: 'file',\n  ext: '.txt'\n});\n// → '/home/user/documents/file.txt'\n```\n\n## API Reference\n\n### Methods\n\n#### `resolve(...paths: string[]): string`\n\nResolves a sequence of paths or path segments into an absolute path.\n\n#### `normalize(path: string): string`\n\nNormalizes a path, resolving `'..'` and `'.'` segments.\n\n#### `isAbsolute(path: string): boolean`\n\nDetermines whether the path is an absolute path.\n\n#### `join(...paths: string[]): string`\n\nJoins all given path segments together using the platform separator as a delimiter, then normalizes the resulting path.\n\n#### `relative(from: string, to: string): string`\n\nReturns the relative path from `from` to `to`.\n\n#### `dirname(path: string): string`\n\nReturns the directory name of a path.\n\n#### `basename(path: string, suffix?: string): string`\n\nReturns the last portion of a path, optionally removing a given suffix.\n\n#### `extname(path: string): string`\n\nReturns the extension of the path, from the last `'.'` to end of string.\n\n#### `parse(path: string): ParsedPath`\n\nReturns an object with properties representing significant elements of the path.\n\n#### `format(pathObject: FormatInputPathObject): string`\n\nReturns a path string from an object - the opposite of `parse()`.\n\n### Constants\n\n#### `sep: string`\n\nThe platform-specific file separator: `'/'`\n\n#### `delimiter: string`\n\nThe platform-specific path delimiter: `':'`\n\n### Types\n\n```typescript\ninterface ParsedPath {\n  root: string;\n  dir: string;\n  base: string;\n  ext: string;\n  name: string;\n}\n\ninterface FormatInputPathObject {\n  dir?: string;\n  root?: string;\n  base?: string;\n  name?: string;\n  ext?: string;\n}\n```\n\n## Why Use This Package?\n\n### Browser Compatibility\n\nThe standard Node.js `path` module is not available in browsers. This package provides the same functionality without requiring Node.js polyfills or bundler configuration.\n\n### Consistent POSIX Behavior\n\nAlways uses POSIX path conventions (forward slashes) regardless of the platform, making it perfect for web applications that work with URLs or need consistent path handling.\n\n### Lightweight Alternative\n\nUnlike full Node.js polyfills, this package only includes the path utilities you need, keeping your bundle size minimal.\n\n## Browser Support\n\nThis package works in all modern browsers that support ES2015+ features:\n\n- Chrome 51+\n- Firefox 54+\n- Safari 10+\n- Edge 15+\n\n## License\n\nApache-2.0\n\nOriginal Node.js implementation:\nCopyright Joyent, Inc. and other Node contributors.\n\n## Contributing\n\nIssues and pull requests are welcome! Please ensure any contributions maintain compatibility with the Node.js `path.posix` API.\n","readmeFilename":"README.md"}