@coderich/util
Advanced tools
Comparing version 1.2.0 to 1.2.1
{ | ||
"name": "@coderich/util", | ||
"main": "src/index.js", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"publishConfig": { | ||
@@ -6,0 +6,0 @@ "access": "public" |
@@ -170,2 +170,9 @@ const FS = require('fs'); | ||
exports.traverse = (mixed, fn, info) => { | ||
exports.map(mixed, (data) => { | ||
const response = fn(data, info); | ||
if (response) exports.traverse(response.value, fn, response.info); | ||
}); | ||
}; | ||
exports.mapPromise = (mixed, fn) => { | ||
@@ -172,0 +179,0 @@ const map = exports.map(mixed, fn); |
8290
191