Dependency Type
Easy · npm
A package.json lists packages in several sections. Here we look at three of them: dependencies, devDependencies and peerDependencies. Any of them may be missing.
Write a function dependencyType(pkg, name) that returns the name of the first section (in that order) that contains name, or null if the package is not listed anywhere.
Next: npm Script Command