1.5.5 • Published 3 years ago
to-read-file v1.5.5
Getting Started
npm install to-read-fileUsage
readFile(source?: string | fg.Pattern[], options?: Options): Buffer
readFiles(source?: string | fg.Pattern[], options?: Options): Buffera.json
{ "name": "a" }b.json
{ "name": "b" }import readFile, { readFiles } from 'to-read-file'
readFile('a.*').toString()
// { "name": "a" }
readFiles('*.json').toString()
// { "name": "a" },{ "name": "b" }Options
Inherited from fast-glob options
{
cwd: process.cwd()
}With additional options:
{
encoding?: null
flag?: string
}