{"name":"line-column-path","version":"4.0.0","description":"Parse and stringify file paths with line and column like `unicorn.js:8:14`","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/line-column-path.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"sideEffects":false,"engines":{"node":">=20"},"scripts":{"test":"xo && ava && tsd"},"keywords":["file","filepath","line","column","path","editor","position","parse","stringify","parsing","decode","encode","format"],"dependencies":{"unicorn-magic":"^0.4.0"},"devDependencies":{"ava":"^6.4.1","tsd":"^0.33.0","xo":"^1.2.3"},"gitHead":"458011b0709a2a489bfc1ad19974475e90e1479e","types":"./index.d.ts","_id":"line-column-path@4.0.0","bugs":{"url":"https://github.com/sindresorhus/line-column-path/issues"},"homepage":"https://github.com/sindresorhus/line-column-path#readme","_nodeVersion":"20.19.5","_npmVersion":"11.6.1","dist":{"integrity":"sha512-Zvpvd56i9FRV5kaJFiiY1t+FNMEH+dGEaLyQprqKlGHBAxJXmdSk+8tVsh6b9YlxbfyyuLrhJCkzwB+AmOBZ0g==","shasum":"e0aa11f217a6c177ec61c455e0587d9b6944adae","tarball":"http://registry-npm.ywwl.com/line-column-path/download/line-column-path-4.0.0.tgz","fileCount":5,"unpackedSize":5531,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC/S7+1sQNuaXAAmoeAIpYb1pSrptED+BEvhMB+zdjJHQIgXwae6lvol+PC42H8+8NEiaA/YF+V8hkmeMAXfI9l8fM="}],"size":2291,"noattachment":false,"key":"/line-column-path/-/line-column-path-4.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/line-column-path_4.0.0_1763812333992_0.9778277466383549"},"_hasShrinkwrap":false,"readme":"# line-column-path\n\n> Parse and stringify file paths with line and column like `unicorn.js:8:14`\n\n## Install\n\n```sh\nnpm install line-column-path\n```\n\n## Usage\n\n```js\nimport {parseLineColumnPath, stringifyLineColumnPath} from 'line-column-path';\n\nconst parsed = parseLineColumnPath('unicorn.js:8:14');\n//=> {file: 'unicorn.js', line: 8, column: 14}\n\nstringifyLineColumnPath(parsed);\n//=> 'unicorn.js:8:14'\n```\n\n## API\n\n### parseLineColumnPath(path)\n\n#### path\n\nType: `string | URL | object`\n\nThe file path to parse.\n\nCan also be an object that you want to validate and normalize.\n\n### stringifyLineColumnPath(path, options?)\n\n#### path\n\nType: `object`\n\nObject with a `.file` property and optionally a `.line` and `.column` property.\n\n#### options\n\nType: `object`\n\n##### file\n\nType: `boolean`\\\nDefault: `true`\n\nOutput the file path.\n\nSetting this to `false` will result in `8:18` instead of `unicorn.js:8:14`.\n\n##### column\n\nType: `boolean`\\\nDefault: `true`\n\nOutput the column.\n\nSetting this to `false` will result in `unicorn.js:8` instead of `unicorn.js:8:14`.\n","publish_time":1763812334245,"_cnpm_publish_time":1763812334245,"dist-tags":{"latest":"4.0.0"}}