Hey there! This problem might be a bit unpredictable, but give it a go and let us know how you do!
A programmer decided to write a JavaScript function that would parse all the package.json files of his workspace to check for specific properties automatically. In order to do that, he needs your help to write a helper function that is used to check if the JSON data that is now an object is a workspace or not. He also needs to check the number of dependencies, devDependencies and peerDependancies. The function should return an array with the data in the order:
true or false if workspace.
number of
dependenciesnumber of
devDependenciesnumber of
peerDependencies
Here is an example.
const data = [true, 3, 4, 5]