Last active
April 15, 2017 20:37
-
-
Save gillesdemey/f9cb493b999676d8965f273b6c4d60fc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs') | |
const pify = require('pify') | |
const readFile = pify(fs.readFile) | |
async function main () { | |
const results = [ | |
await readFile('foo.txt'), | |
await readFile('bar.txt') | |
].join('\n') | |
console.log(results) | |
} | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment