首页 > 技术文章 > _.contains is not a function

zc1234 2017-05-11 20:03 原文

在使用lodash的时候报_.contains is not a function,这是因为从lodash V3.10.1开始,将去掉contains函数,改用includes。

可以换为:_.contains()->_.includes()

推荐阅读