Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env narwhal
- // Usage: $ wtf-api file
- // $ wtf-api file isDirectory rmtree
- var args = require('system').args
- , m = require(args[1])
- if (args.length > 2)
- args.slice(2).forEach(function(prop) {
- if (prop in m)
- print(prop + ': ' + m[prop])
- else
- print(args[1] + " doesn't have a property called " + prop)
- })
- else
- for (var x in m) print(x + ': ' + m[x])
Add Comment
Please, Sign In to add comment