Guest User

Untitled

a guest
Dec 17th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. #!/usr/bin/env node
  2. function trace(base) {
  3. return function() {
  4. console.log('called at:', new Error().stack.split('\n')[2].trim());
  5. return base.apply(this, arguments);
  6. };
  7. }
  8.  
  9. var path = require('path');
  10. path.exists = trace(path.exists);
  11. path.existsSync = trace(path.existsSync);
Add Comment
Please, Sign In to add comment