Created
June 11, 2015 18:25
-
-
Save twhid/7281eb172347ef0a3447 to your computer and use it in GitHub Desktop.
One-liner to resolve the directory path of a module using the built-in Node.js algorithm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var moduleDir = require.resolve('module/package').replace('package.json', ''); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment