Skip to content

Instantly share code, notes, and snippets.

Avatar
🐢
I may be slow to respond.

Lucio Paiva luciopaiva

🐢
I may be slow to respond.
View GitHub Profile
@luciopaiva
luciopaiva / walksync.js
Last active Oct 29, 2020 — forked from kethinov/walksync.js
List all files in a directory in Node.js recursively in a synchronous fashion
View walksync.js
#!/usr/bin/env node
const
path = require("path"),
fs = require("fs");
/**
* List all files in a directory recursively in a synchronous fashion
*
* @param {String} dir