@visulima/fs
Version:
Human friendly file system utilities for Node.js
17 lines (14 loc) • 536 B
JavaScript
import walkSync from './walkSync-CFwkbDz9.mjs';
var __defProp = Object.defineProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
const collectSync = /* @__PURE__ */ __name((directory, options = {}) => {
if (!Array.isArray(options.extensions)) {
options.extensions = ["js", "mjs", "cjs", "ts"];
}
const entries = [];
for (const entry of walkSync(directory, options)) {
entries.push(entry.path);
}
return entries;
}, "collectSync");
export { collectSync as default };