input-from-file
v0.1.0-alpha.4
Published
create input that reads a file as text.
Downloads
4,373
Readme
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 filestring
: The text contents of the file
See create-josh.vercel.app > Engine > Runtime > Inputs for more documentation on Inputs.