UNPKG

mgs-graphql

Version:

The simple way to generates GraphQL schemas and Sequelize models from your models definition,microservice supported

18 lines (15 loc) 349 B
/** * Created by yuyanq on 2018/8/6. */ const fs = require('fs') function exists (thePath) { try { const state = fs.statSync(thePath) return state.isFile() } catch (e) { throw new Error(`no such file or directory, stat ${thePath}`) } } exports.isFile = function isFile (filePath) { return exists(filePath) }