Skip to content

Latest commit

 

History

History
25 lines (16 loc) · 738 Bytes

File metadata and controls

25 lines (16 loc) · 738 Bytes

nodejsscriptDocs


nodejsscript / s / read

Function: read()

read(options): Promise<ShellString>

This function mimic read command. So, the function purpose is reading from stdin.

const answer= await $.read({ "-p": "Question" });
const color= await $.read({ "-p": "Your color", completions: [ "red", "green" ] });
if($.isFIFO(0)) await $.read().then(echo.bind(null, "E.g. for reading received input:"));

Parameters

options: ReadOptions

Returns

Promise<ShellString>