_.contains -> _.includes
This commit is contained in:
@ -95,7 +95,7 @@ function dirRegex(dir, regexp) {
|
||||
function dirOpts(dir, opts) {
|
||||
opts = _.isArray(opts) ? opts : [opts];
|
||||
return dirFilter(dir, function (name) {
|
||||
return _.contains(opts, name);
|
||||
return _.includes(opts, name);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@ api._namespaces = <%= stringify(namespaces) %>;<%
|
||||
|
||||
_.each(actions, function (action) {
|
||||
var namespace = action.location.split('.').shift();
|
||||
if (_.contains(namespaces, namespace)) {
|
||||
if (_.includes(namespaces, namespace)) {
|
||||
_.pull(namespaces, namespace);
|
||||
%>
|
||||
|
||||
|
||||
@ -274,7 +274,7 @@ Transport.prototype.request = function (params, cb) {
|
||||
if (
|
||||
(!err || err instanceof errors.Serialization)
|
||||
&& (status < 200 || status >= 300)
|
||||
&& (!params.ignore || !_.contains(params.ignore, status))
|
||||
&& (!params.ignore || !_.includes(params.ignore, status))
|
||||
) {
|
||||
|
||||
var errorMetadata = _.pick(params.req, ['path', 'query', 'body']);
|
||||
|
||||
Reference in New Issue
Block a user