javascript - Assign Module Value to Variable -


is there way use module recursive-readdir such:

var recursive = require('recursive-readdir');  var files = recursive-readdir(dir); 

instead of:

var recursive = require('recursive-readdir');  recursive('some/path', function (err, files) {   // files array of filename    console.log(files); }); 

sorry if dumb question, i'm confused.

thank in advance.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -