搜索 npm 上的 JavaScript 依赖包
finds an item in an array matching a predicate function, and returns its index