Get the dependencies and devDependencies of a package.json in an array
const getDeps = require('simple-dependencies');
getDeps('./package.json')
.then(data => {
console.log(data);
});
For this package.json:
{
dependencies: {
"x": "0.0.0",
"y": "0.0.0"
},
devDependencies: {
"z": "0.0.0",
"w": "0.0.0"
}
}
The output will be:
["x", "y", "z", "w"]