Skip to content

Instantly share code, notes, and snippets.

@elliptic-shiho
Created August 1, 2015 10:11
Show Gist options
  • Save elliptic-shiho/f75921098d6a2fa10b60 to your computer and use it in GitHub Desktop.
Save elliptic-shiho/f75921098d6a2fa10b60 to your computer and use it in GitHub Desktop.
module.exports=function(p,m,c){require('fs').readdir(p,function(e,d){if(e!==null){return c(e,null)}c(null,d.filter(function(x){b=x.lastIndexOf("."+m);return b>=0&&b==x.length-m.length-1}))})};
require('./moduler_module.js')(process.argv[2],process.argv[3],function(e,d){console.log(d.join("\n"))});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment