UNPKG

@visulima/fs

Version:

Human friendly file system utilities for Node.js

19 lines (15 loc) 551 B
'use strict'; const walkSync = require('./walkSync-BidUqvMI.cjs'); 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"); module.exports = collectSync;