ReadFrom
Read text content from different endpoints with Node.js.
Quick examples:
ReadFrom().file('file.txt').then(function (data) {
console.log(data);
}).catch(function (error) {
console.trace(error);
});
ReadFrom().stdin().then(function (data) {
console.log(data);
}).catch(function (error) {
console.trace(error);
});
ReadFrom().url('https://example.com/').then(function (data) {
console.log(data);
}).catch(function (error) {
console.trace(error);
});
ReadFrom().clipboard().then(function (data) {
console.log(data);
}).catch(function (error) {
console.trace(error);
});
TODO:
- Create documentation.
- Add tests with mocha.