input-from-file-json
v0.5.5
Published
Bingo input that reads a file as JSON.
Downloads
33,499
Readme
npm i input-from-file-jsonimport { inputFromFileJSON } from "input-from-file-json";
await take(inputFromFileJSON, { filePath: "data.json" });Options
inputFromFileJSON takes a single argument, filePath, of type string.
It reads the filePath from disk and returns either:
Error: If an error was caught reading or parsing the fileunknown: The result of runningJSON.parseon the file's text contents
See create.bingo > Templates > Concepts > Inputs for more documentation on Inputs.
