UNPKG

charlike

Version:

Small, fast, simple and streaming project scaffolder for myself, but not only. Supports hundreds of template engines through the @JSTransformers API or if you want custom `render` function passed through options

19 lines (15 loc) 341 B
/*! * fs-exists-sync (https://github.com/jonschlinkert/fs-exists-sync) * * Copyright (c) 2016, Jon Schlinkert. * Licensed under the MIT License. */ 'use strict'; var fs = require('fs'); module.exports = function(filepath) { try { (fs.accessSync || fs.statSync)(filepath); return true; } catch (err) {} return false; };