recursive-dir-reader
Advanced tools
Comparing version 1.1.2 to 1.2.0
@@ -13,2 +13,6 @@ 'use strict'; | ||
function async(dir, callback = undefined) { | ||
if (callback && typeof callback !== 'function') { | ||
throw new Error('Expected callback function'); | ||
} | ||
const paths = []; | ||
@@ -47,2 +51,6 @@ | ||
function sync(dir, callback = undefined) { | ||
if (callback && typeof callback !== 'function') { | ||
throw new Error('Expected callback function'); | ||
} | ||
const paths = []; | ||
@@ -49,0 +57,0 @@ |
{ | ||
"name": "recursive-dir-reader", | ||
"version": "1.1.2", | ||
"version": "1.2.0", | ||
"description": "reading directory and subdirectories", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -23,2 +23,3 @@ ##### The module is required for sync or async reading of dir and subdirs. | ||
// EX 1 | ||
readdir.sync('./someDir', path => { | ||
@@ -33,2 +34,4 @@ console.info(path); | ||
// EX 2 | ||
readdir.async('./someDir', path => { | ||
@@ -43,2 +46,3 @@ console.info(path); | ||
// EX 3 | ||
const filesIntoDirSync = readdir.sync('./someDir'); | ||
@@ -55,2 +59,3 @@ | ||
// EX 4 | ||
const filesIntoDirAsync = readdir.async('./someDir'); | ||
@@ -57,0 +62,0 @@ |
Sorry, the diff of this file is not supported yet
21578
91
14
61