Skip to content

Instantly share code, notes, and snippets.

View angrymarker's full-sized avatar
🤠
yee: haw'd

angrymarker

🤠
yee: haw'd
View GitHub Profile
@jakub-g
jakub-g / cleanEmptyFoldersRecursively.js
Created April 3, 2015 15:31
nodejs: remove empty directories recursively
function cleanEmptyFoldersRecursively(folder) {
var fs = require('fs');
var path = require('path');
var isDir = fs.statSync(folder).isDirectory();
if (!isDir) {
return;
}
var files = fs.readdirSync(folder);