Last active
June 9, 2017 14:45
-
-
Save pmarques/21636eb9eb2a357f604a8f9574cf7187 to your computer and use it in GitHub Desktop.
Lambda function to print NodeJS installed packages
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') | |
exports.handler = (event, context, callback) => { | |
module.paths.concat('/var/runtime/node_modules') | |
.forEach((path) => { | |
if (!fs.existsSync(path)) | |
return; | |
const d = fs.readdirSync(path); | |
console.log(path, d); | |
}) | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment