sget ![badge](http://img.shields.io/badge/npm-sget-green.svg?style=flat-square)
Async / Sync read line for Node.
Install
npm install sget
Description
Reads a line from the standard input synchronously if no callback is specified, otherwise reads it asynchronously. Think C gets for Node.
Usage
var sget = require('sget');
var something = sget('Say something. I\'ll wait.');
console.log('You said', something);
sget('Leave word and you will be heard.', function(data) {
console.log('I heard you said', data);
});
console.log('\nThis test is not over.');
Test
./test.js
If the above fails, you may need to give execute permissions to the file owner, just run chmod u+x test.js
. Click here for more info.
Help
Do you want to help? Open an issue here. Comments, feedback and / or pull requests are welcome.
License
MIT © Jorge Bucaran