INNER CODE UNIT · JavaScript

moved

pegaltier/awesome-utils-dev · node_scripts/wip-dedupe.js:99

const moved = []; // { line, file }

for (const line of wipLines) {
    if (!line.trim()) {
        kept.push(line);
        continue;
    }
    const found = findExisting(line);
    if (found) moved.push({ line, file: found });
    else kept.push(line);
}

for (const { line, file } of moved) {
    console.log(`- ${line.trim()}\n    already in ${file}`);
}
console.log(`\n${moved.length} line(s) already in the repo, ${kept.filter((l) => l.trim()).length} left in WIP.md`);

if (dryRun) {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…