Skip to content

Instantly share code, notes, and snippets.

@chrismatthieu
Created May 25, 2018 18:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrismatthieu/6c5a6a1e0831311d50f6c10ad431c038 to your computer and use it in GitHub Desktop.
Save chrismatthieu/6c5a6a1e0831311d50f6c10ad431c038 to your computer and use it in GitHub Desktop.
process.stdin.setEncoding('utf8');
process.stdin.on('readable', () => {
var input = process.stdin.read();
if(input !== null) {
var result = sentiment(input)
process.stdout.write(JSON.stringify(result));
process.exit();
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment