module-name-from-path
Extract the Node.js module name given an absolute path to a file inside the module.
Installation
npm install module-name-from-path --save
Usage
var assert = var parse = var path = '/Users/watson/code/node_modules/blackjack/node_modules/picture-tube/bin/tube.js' assert
Returns undefined
if module name cannot be found.
License
MIT