Skip to content

Instantly share code, notes, and snippets.

@tarzak
Last active August 29, 2015 13:57
Show Gist options
  • Save tarzak/9682304 to your computer and use it in GitHub Desktop.
Save tarzak/9682304 to your computer and use it in GitHub Desktop.
Обидва файли
var myFirstModule = require("./myFirstModule");
myFirstModule.start();
var fs = require('fs'),
path = require('path'),
pathName = process.argv[2],
fileExt = "." + process.argv[3], i;
function start(){
function callback(err, list){
for (i in list)
if (path.extname(list[i]) === fileExt)
console.log(list[i]);
};
fs.readdir(pathName, callback);
}
exports.start = start;
@tarzak
Copy link
Author

tarzak commented Mar 21, 2014

От тут обидва файли і я відразу писав exports.start = start; виявляється). Значить йому щось інше не подобається :(.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment