Created
August 26, 2018 23:34
-
-
Save crissilvaeng/d0fcfae93a8a6a7148ccebf083030e23 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 load = protos => { | |
const dirname = path.join(__dirname, config.rpc.protos) | |
return fs.readdirSync(dirname) | |
.reduce((accum, curr) => { | |
if (curr.endsWith('.proto') == true) { | |
const proto = path.join(__dirname, config.rpc.protos, curr) | |
return [...accum, proto] | |
} | |
}, []) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment