Guest User

Untitled

a guest
May 25th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. #!/usr/bin/env narwhal
  2.  
  3. // Usage: $ wtf-api file
  4. // $ wtf-api file isDirectory rmtree
  5.  
  6. var args = require('system').args
  7. , m = require(args[1])
  8.  
  9. if (args.length > 2)
  10. args.slice(2).forEach(function(prop) {
  11. if (prop in m)
  12. print(prop + ': ' + m[prop])
  13. else
  14. print(args[1] + " doesn't have a property called " + prop)
  15. })
  16. else
  17. for (var x in m) print(x + ': ' + m[x])
Add Comment
Please, Sign In to add comment