UNPKG

@visulima/fs

Version:

Human friendly file system utilities for Node.js

17 lines (14 loc) 524 B
import walk from './walk-BIh3_ljI.mjs'; var __defProp = Object.defineProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); const collect = /* @__PURE__ */ __name(async (directory, options = {}) => { if (!Array.isArray(options.extensions)) { options.extensions = ["js", "mjs", "cjs", "ts"]; } const entries = []; for await (const entry of walk(directory, options)) { entries.push(entry.path); } return entries; }, "collect"); export { collect as default };