Created
September 1, 2012 08:27
-
-
Save eladb/3567201 to your computer and use it in GitHub Desktop.
Who calls `path.exists`?
This file contains hidden or 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
#!/usr/bin/env node | |
function trace(base) { | |
return function() { | |
console.log('called at:', new Error().stack.split('\n')[2].trim()); | |
return base.apply(this, arguments); | |
}; | |
} | |
var path = require('path'); | |
path.exists = trace(path.exists); | |
path.existsSync = trace(path.existsSync); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Put this at the beginning of your node app's index file and you should see the call site