const fs = require('fs'); const createDirIfNotExists = dir => (!fs.existsSync(dir) ? fs.mkdirSync(dir) : undefined); // Example createDirIfNotExists('test'); // creates the directory 'test', if it doesn't exist
const fs = require('fs'); const createDirIfNotExists = dir => (!fs.existsSync(dir) ? fs.mkdirSync(dir) : undefined); // Example createDirIfNotExists('test'); // creates the directory 'test', if it doesn't exist