MCPcopy Index your code
hub / github.com/ampproject/amphtml / readFromStdin

Function readFromStdin

validator/js/nodejs/index.js:80–85  ·  view source on GitHub ↗

* Creates a promise which reads from standard input. Even though it would * be easy to make a function that just returns the data, we return a promise * for consistency with readFromUrl and readFromFile. * @return {Promise }

()

Source from the content-addressed store, hash-verified

78 * @return {Promise<string>}
79 */
80function readFromStdin() {
81 return readFromReadable('stdin', process.stdin).then(function(data) {
82 process.stdin.resume();
83 return data;
84 });
85}
86
87/**
88 * Creates a promise which reads from a URL or more precisely, fetches

Callers 1

mainFunction · 0.85

Calls 3

readFromReadableFunction · 0.85
thenMethod · 0.45
resumeMethod · 0.45

Tested by

no test coverage detected