input-from-file-json
TypeScript icon, indicating that this package has built-in type declarations

0.5.4 • Public • Published

input-from-file-json

Bingo input that reads a file as JSON.

🤝 Code of Conduct: Kept 📝 License: MIT 📦 npm version 💪 TypeScript: Strict

npm i input-from-file-json
import { 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 file
  • unknown: The result of running JSON.parse on the file's text contents

See create.bingo > Templates > Concepts > Inputs for more documentation on Inputs.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.5.412,759latest

Version History

VersionDownloads (Last 7 Days)Published
0.5.412,759
0.5.35
0.5.24
0.5.13
0.5.05
0.4.10
0.4.00
0.2.00
0.1.0-alpha.40
0.1.0-alpha.31
0.1.0-alpha.22
0.1.0-alpha.10
0.1.0-alpha.00

Package Sidebar

Install

npm i input-from-file-json

Weekly Downloads

12,779

Version

0.5.4

License

MIT

Unpacked Size

7.55 kB

Total Files

11

Last publish

Collaborators

  • joshuakgoldberg