UNPKG

@visulima/fs

Version:

Human friendly file system utilities for Node.js

19 lines (15 loc) 539 B
'use strict'; const walk = require('./walk-PpNwjtjX.cjs'); 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"); module.exports = collect;