Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:
const fs = require('fs');

const makeDirectoryIfNotExistsSync = directory => {
  if (typeof directory !== 'string') {
    throw new Error(`makeDirectoryIfNotExistsSync expects a string, got ${typeof directory}`);
  }

  try {
    fs.statSync(directory);
  } catch (e) {
    fs.mkdirSync(directory);
  }
};

module.exports = {
  makeDirectoryIfNotExistsSync,
};