UNPKG

@sector-labs/seo-slip

Version:

Catches SEO regressions by sampling and checking a website against a set of rules

14 lines (11 loc) 300 B
const path = require('path'); const fs = require('fs'); const ensurePathExists = (filePath) => { const dirname = path.dirname(filePath); if (fs.existsSync(dirname)) { return true; } ensurePathExists(dirname); fs.mkdirSync(dirname); }; module.exports = ensurePathExists;