a minimal implementation of the resolve module
A minimal implementation of the resolve module. It cheats and uses some of nodes "private" internals but they consider their module API frozen so no need to worry.
npm install resolve-module
then in your app:
var resolve = require'resolve-module'
resolve__filename 'fs' // => 'fs'resolve__filename './' // => __dirname + '/index.js'resolve__filename 'jsmd' // => __dirname + '/node_modules/jsmd/lib/jsmd.js'