Created
August 30, 2017 11:49
-
-
Save watilde/b17ccc56058ee56d2ad8e3acce725ced to your computer and use it in GitHub Desktop.
This file contains 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 asde = require('asde') | |
const fs = require('fs') | |
const stat = asde(fs.stat) | |
async function main () { | |
const [errStat, config] = await stat('./config') | |
if (errStat) { | |
return console.error(errStat) | |
} | |
// magic number | |
const [errStat2, value] = await stat('./file') | |
if (errStat2) { | |
return console.error(errStat) | |
} | |
console.log(value) | |
console.log(value) | |
} | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment