/usr/share/doc/node-read/examples/example.js is in node-read 1.0.7-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 | var read = require("../lib/read.js")
read({prompt: "Username: ", default: "test-user" }, function (er, user) {
read({prompt: "Password: ", default: "test-pass", silent: true }, function (er, pass) {
read({prompt: "Password again: ", default: "test-pass", silent: true }, function (er, pass2) {
console.error({user: user,
pass: pass,
verify: pass2,
passMatch: (pass === pass2)})
console.error("the program should exit now")
})
})
})
|