UNPKG

@softwareventures/maintain-project

Version:

Automatically create and maintain TypeScript projects with standard settings for Software Ventures Limited

13 lines 506 B
export const emptyDirectory = { type: "directory", entries: new Map() }; export function list(options) { return listInternal("", options); } function* listInternal(pathPrefix, options) { for (const [path, file] of options.directory.entries) { yield { path: pathPrefix + path, file }; if ((options.recursive ?? false) && file.type === "directory") { yield* listInternal(`${path}/`, { ...options, directory: file }); } } } //# sourceMappingURL=directory.js.map