serverless/lib/utils/fs/read-file.js
2024-05-29 11:51:04 -04:00

11 lines
228 B
JavaScript

import { promises as fsp } from 'fs'
import parse from './parse.js'
async function readFile(filePath) {
return fsp
.readFile(filePath, 'utf8')
.then((contents) => parse(filePath, contents))
}
export default readFile