{"_id":"module-details-from-path","_rev":"1313013","name":"module-details-from-path","description":"Resolve npm package details, like name and base path, given an absolute path to a file inside a package","dist-tags":{"latest":"1.0.4"},"maintainers":[{"name":"watson","email":"w@tson.dk"}],"time":{"modified":"2026-09-08T07:27:21.000Z","created":"2016-02-09T10:33:09.711Z","1.0.4":"2025-04-29T16:59:53.775Z","1.0.3":"2016-07-09T14:21:00.366Z","1.0.2":"2016-02-09T12:07:41.185Z","1.0.1":"2016-02-09T10:56:08.480Z","1.0.0":"2016-02-09T10:33:09.711Z"},"users":{"flumpus-dev":true},"author":{"name":"Thomas Watson","email":"w@tson.dk","url":"https://wa.tson.dk/"},"repository":{"type":"git","url":"git+https://github.com/watson/module-details-from-path.git"},"versions":{"1.0.4":{"name":"module-details-from-path","version":"1.0.4","description":"Resolve npm package details, like name and base path, given an absolute path to a file inside a package","main":"index.js","dependencies":{},"devDependencies":{"bench-node":"^0.5.4","standard":"^15.0.1","tape":"^4.6.0"},"scripts":{"bench":"node --allow-natives-syntax bench.js","lint":"standard","test":"standard && node test.js","test:ci":"node test.js"},"repository":{"type":"git","url":"git+https://github.com/watson/module-details-from-path.git"},"keywords":["node","nodejs","npm","module","package","extract","parse","name","basedir","directory","path","relative"],"author":{"name":"Thomas Watson","email":"w@tson.dk","url":"https://wa.tson.dk/"},"license":"MIT","bugs":{"url":"https://github.com/watson/module-details-from-path/issues"},"homepage":"https://github.com/watson/module-details-from-path#readme","coordinates":[55.666507,12.5798711],"_id":"module-details-from-path@1.0.4","gitHead":"a7df269d5eb0803bb26ab61cb486f7c1fb4fad9c","_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-EGWKgxALGMgzvxYF1UyGTy0HXX/2vHLkw6+NvDKW2jypWbHpjQuj4UMcqQWXHERJhVGKikolT06G3bcKe4fi7w==","shasum":"b662fdcd93f6c83d3f25289da0ce81c8d9685b94","tarball":"http://registry-npm.ywwl.com/module-details-from-path/download/module-details-from-path-1.0.4.tgz","fileCount":4,"unpackedSize":3958,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIE8MWZakKcUYdjHnIqDS3U26etM9f4/kclfFvn6gSZ7IAiEAtJlPgGq/oHaZNWEvjudwfujIIzfmXlg1jG+O9P88/eg="}],"size":1961,"noattachment":false,"key":"/module-details-from-path/-/module-details-from-path-1.0.4.tgz"},"_npmUser":{"name":"watson","email":"w@tson.dk"},"directories":{},"maintainers":[{"name":"watson","email":"w@tson.dk"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/module-details-from-path_1.0.4_1745945993545_0.3113631506706067"},"_hasShrinkwrap":false,"publish_time":1745945993775,"_cnpm_publish_time":1745945993775},"1.0.3":{"name":"module-details-from-path","version":"1.0.3","description":"Extract the Node.js module details like name and base path given an abosulte path to a file inside the module","main":"index.js","dependencies":{},"devDependencies":{"standard":"^7.1.2","tape":"^4.6.0"},"scripts":{"test":"standard && node test.js"},"repository":{"type":"git","url":"git+https://github.com/watson/module-details-from-path.git"},"keywords":["node","nodejs","npm","module","extract","parse","name","basedir","directory","path","relative"],"author":{"name":"Thomas Watson Steen","email":"w@tson.dk","url":"https://twitter.com/wa7son"},"license":"MIT","bugs":{"url":"https://github.com/watson/module-details-from-path/issues"},"homepage":"https://github.com/watson/module-details-from-path#readme","coordinates":[55.666507,12.5798711],"gitHead":"6b231a35fae6b7f5b6b12b55fbb75fd4913afe5a","_id":"module-details-from-path@1.0.3","_shasum":"114c949673e2a8a35e9d35788527aa37b679da2b","_from":".","_npmVersion":"2.15.5","_nodeVersion":"4.4.5","_npmUser":{"name":"watson","email":"w@tson.dk"},"maintainers":[{"name":"watson","email":"w@tson.dk"}],"dist":{"shasum":"114c949673e2a8a35e9d35788527aa37b679da2b","tarball":"http://registry-npm.ywwl.com/module-details-from-path/download/module-details-from-path-1.0.3.tgz","integrity":"sha512-ySViT69/76t8VhE1xXHK6Ch4NcDd26gx0MzKXLO+F7NOtnqH68d9zF94nT8ZWSxXh8ELOERsnJO/sWt1xZYw5A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF51ss92DzCi8LtmIbpXXty680dNNQfuQKAfh4csmbagAiEA/ABqV4bu190p5NoC9Gw6yMUr6ujMNyJ+9k2oAZxwFVs="}],"size":2194,"noattachment":false,"key":"/module-details-from-path/-/module-details-from-path-1.0.3.tgz"},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/module-details-from-path-1.0.3.tgz_1468074058960_0.0820276674348861"},"directories":{},"publish_time":1468074060366,"_cnpm_publish_time":1468074060366},"1.0.2":{"name":"module-details-from-path","version":"1.0.2","description":"Extract the Node.js module details like name and base path given an abosulte path to a file inside the module","main":"index.js","dependencies":{},"devDependencies":{"standard":"^6.0.4","tape":"^4.4.0"},"scripts":{"test":"standard && node test.js"},"repository":{"type":"git","url":"git+https://github.com/watson/module-details-from-path.git"},"keywords":["node","nodejs","npm","module","extract","parse","name","basedir","directory","path","relative"],"author":{"name":"Thomas Watson Steen","email":"w@tson.dk","url":"https://twitter.com/wa7son"},"license":"MIT","bugs":{"url":"https://github.com/watson/module-details-from-path/issues"},"homepage":"https://github.com/watson/module-details-from-path#readme","coordinates":[55.6665316,12.5802111],"gitHead":"825df40c839530ac374bb416f354bd2613ed0130","_id":"module-details-from-path@1.0.2","_shasum":"742c057e247693d6736f19d00d79580e5c0bb560","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.2","_npmUser":{"name":"watson","email":"w@tson.dk"},"maintainers":[{"name":"watson","email":"w@tson.dk"}],"dist":{"shasum":"742c057e247693d6736f19d00d79580e5c0bb560","tarball":"http://registry-npm.ywwl.com/module-details-from-path/download/module-details-from-path-1.0.2.tgz","integrity":"sha512-Vc8GUqJ/wNvAXf0+enaxIRhLDcwVrOpOHnLD91xARhwG6G+V+CdcpaSZCcrV6ElWnY59XYtv5QgQ5sjkEvH7lQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHbHEr6yGbIvr9kgeNIm3nZazOnYv7ZAgxdhFcZIQ6yIAiEAiKNCgapkzLsR1NdKQBL5V/l4jYD0V2uIxl/3ujq9Llc="}],"size":2117,"noattachment":false,"key":"/module-details-from-path/-/module-details-from-path-1.0.2.tgz"},"_npmOperationalInternal":{"host":"packages-9-west.internal.npmjs.com","tmp":"tmp/module-details-from-path-1.0.2.tgz_1455019658355_0.7972114481963217"},"directories":{},"publish_time":1455019661185,"_cnpm_publish_time":1455019661185},"1.0.1":{"name":"module-details-from-path","version":"1.0.1","description":"Extract the Node.js module details like name and base path given an abosulte path to a file inside the module","main":"index.js","dependencies":{},"devDependencies":{"standard":"^6.0.4","tape":"^4.4.0"},"scripts":{"test":"standard && node test.js"},"repository":{"type":"git","url":"git+https://github.com/watson/module-details-from-path.git"},"keywords":["node","nodejs","npm","module","extract","parse","name","basedir","directory","path","relative"],"author":{"name":"Thomas Watson Steen","email":"w@tson.dk","url":"https://twitter.com/wa7son"},"license":"MIT","bugs":{"url":"https://github.com/watson/module-details-from-path/issues"},"homepage":"https://github.com/watson/module-details-from-path#readme","coordinates":[55.6665681,12.5800787],"gitHead":"6664b90a43bf1beb9e4770992ac13d17ed5a66f5","_id":"module-details-from-path@1.0.1","_shasum":"3af40936eae5b87a9a37ead0a2ad77da54649c8c","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.2","_npmUser":{"name":"watson","email":"w@tson.dk"},"maintainers":[{"name":"watson","email":"w@tson.dk"}],"dist":{"shasum":"3af40936eae5b87a9a37ead0a2ad77da54649c8c","tarball":"http://registry-npm.ywwl.com/module-details-from-path/download/module-details-from-path-1.0.1.tgz","integrity":"sha512-cydMV+lPrgJjjw/BHoAAH+r5dXXSlDX4fJGmnX+f1GyhiDMgJgVVXfOqJ+1aF1I9+91H58++Pt8rUpsUfaRC2g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF28gDcUYZT1XKzioKrkoGRbY/51QndbHKxBQMVoLPEaAiAbpULuyNAvjL4LJUBL29Fbre/UUG3uYZKzrGC91Vy8jA=="}],"size":2108,"noattachment":false,"key":"/module-details-from-path/-/module-details-from-path-1.0.1.tgz"},"_npmOperationalInternal":{"host":"packages-6-west.internal.npmjs.com","tmp":"tmp/module-details-from-path-1.0.1.tgz_1455015365648_0.9046150476206094"},"directories":{},"publish_time":1455015368480,"_cnpm_publish_time":1455015368480},"1.0.0":{"name":"module-details-from-path","version":"1.0.0","description":"Extract the Node.js module details like name and base path given an abosulte path to a file inside the module","main":"index.js","dependencies":{},"devDependencies":{"standard":"^6.0.4"},"scripts":{"test":"standard && node test.js"},"repository":{"type":"git","url":"git+https://github.com/watson/module-details-from-path.git"},"keywords":["node","nodejs","npm","module","extract","parse","name","basedir","directory","path","relative"],"author":{"name":"Thomas Watson Steen","email":"w@tson.dk","url":"https://twitter.com/wa7son"},"license":"MIT","bugs":{"url":"https://github.com/watson/module-details-from-path/issues"},"homepage":"https://github.com/watson/module-details-from-path#readme","coordinates":[55.6665739,12.5800608],"gitHead":"275d823a5905e659dec5f5bdde225ccd0c5d5da3","_id":"module-details-from-path@1.0.0","_shasum":"6f6916095ce642f34b86cf3dcaecfdf7d5e4d202","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.2","_npmUser":{"name":"watson","email":"w@tson.dk"},"maintainers":[{"name":"watson","email":"w@tson.dk"}],"dist":{"shasum":"6f6916095ce642f34b86cf3dcaecfdf7d5e4d202","tarball":"http://registry-npm.ywwl.com/module-details-from-path/download/module-details-from-path-1.0.0.tgz","integrity":"sha512-h+9pMSG3BKztYWMrY21TnF/IZKklMh+HsJmaLDdgoQlSt+rLMcsLj0mbRYV4o3yefgSgoGYdswVn3FMavRk0RQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDxBiH54Me1P5N6QKwIm7t78UVIV2KoAuzYegA5jQWRDgIgRFEB3TIhGXh/ud1GnoYCDjBulV8hw0I/eXSJEWf5DUc="}],"size":2064,"noattachment":false,"key":"/module-details-from-path/-/module-details-from-path-1.0.0.tgz"},"_npmOperationalInternal":{"host":"packages-9-west.internal.npmjs.com","tmp":"tmp/module-details-from-path-1.0.0.tgz_1455013986779_0.4744950954336673"},"directories":{},"publish_time":1455013989711,"_cnpm_publish_time":1455013989711}},"readme":"# module-details-from-path\n\nResolve npm package details, like name and base path, given an absolute path to a file inside a package.\n\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard)\n\n## Installation\n\n```\nnpm install module-details-from-path --save\n```\n\n## Usage\n\n```js\nconst assert = require('assert')\nconst parse = require('module-details-from-path')\n\nconst path = '/Users/watson/code/node_modules/blackjack/node_modules/picture-tube/bin/tube.js'\n\nassert.deepStrictEqual(parse(path), {\n  name: 'picture-tube',\n  basedir: '/Users/watson/code/node_modules/blackjack/node_modules/picture-tube',\n  path: 'bin/tube.js'\n})\n```\n\nReturns `undefined` if module details cannot be found.\n\n## License\n\nMIT\n","_attachments":{},"homepage":"https://github.com/watson/module-details-from-path#readme","bugs":{"url":"https://github.com/watson/module-details-from-path/issues"},"license":"MIT"}