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

0.5.0 • Public • Published

input-from-file

Bingo input that reads a file as text.

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

npm i input-from-file
import { inputFromFile } from "input-from-file";

await take(inputFromFile, { filePath: "data.txt" });

Options

inputFromFile takes a single argument, filePath, of type string.

It reads the filePath from disk and returns either:

  • Error: If an error was caught reading the file
  • string: The text contents of the file

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

Readme

Keywords

none

Package Sidebar

Install

npm i input-from-file

Weekly Downloads

128

Version

0.5.0

License

MIT

Unpacked Size

7.58 kB

Total Files

11

Last publish

Collaborators

  • joshuakgoldberg