UNPKG

@lucadani7/algonodejs-for-beginners

Version:

Just a simple Node.js package with some basic algorithms perfect for people just starting out. It's got easy-to-understand TypeScript versions of stuff like sorting, searching, math with numbers, and messing with strings.

13 lines (12 loc) 461 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const fs = require("fs"); const path = require("path"); const dir = "."; const files = fs.readdirSync(dir); const exportLines = files .filter(file => file.endsWith(".ts") && file !== "index.ts") .map(file => `export * from "./${path.basename(file, ".ts")}";`) .join("\n"); fs.writeFileSync(path.join(dir, "index.ts"), exportLines); console.log("✅ index.ts generated!");