UNPKG

serverless

Version:

Serverless Framework - Build web, mobile and IoT applications with serverless architectures using AWS Lambda, Azure Functions, Google CloudFunctions & more

13 lines (9 loc) 218 B
'use strict'; const fsp = require('fs').promises; async function fileExists(filePath) { return fsp .lstat(filePath) .then((stats) => stats.isFile()) .catch(() => false); } module.exports = fileExists;