Use lodash.includes instead of lodash.contains.
This commit is contained in:
parent
76d54b8914
commit
1a21989ad1
@ -49,13 +49,13 @@
|
||||
"lodash.assign": "^3.0.0",
|
||||
"lodash.bind": "^3.0.0",
|
||||
"lodash.clone": "^3.0.1",
|
||||
"lodash.contains": "^2.4.1",
|
||||
"lodash.difference": "^3.0.1",
|
||||
"lodash.filter": "^3.1.0",
|
||||
"lodash.find": "^3.0.0",
|
||||
"lodash.findindex": "^3.0.0",
|
||||
"lodash.foreach": "^3.0.1",
|
||||
"lodash.has": "^3.0.0",
|
||||
"lodash.includes": "^3.1.1",
|
||||
"lodash.isarray": "^3.0.0",
|
||||
"lodash.isempty": "^3.0.0",
|
||||
"lodash.isfunction": "^3.0.1",
|
||||
|
@ -2,9 +2,9 @@
|
||||
{format: $formatUrl, parse: $parseUrl} = require 'url'
|
||||
|
||||
$Bluebird = require 'bluebird'
|
||||
$contains = require 'lodash.contains'
|
||||
$debug = (require 'debug') 'xo:xo'
|
||||
$forEach = require 'lodash.foreach'
|
||||
$includes = require 'lodash.includes'
|
||||
$isEmpty = require 'lodash.isempty'
|
||||
$isString = require 'lodash.isstring'
|
||||
$pluck = require 'lodash.pluck'
|
||||
@ -355,7 +355,7 @@ class $XO extends $EventEmitter
|
||||
|
||||
if type? and (
|
||||
($isString type and type isnt obj.type) or
|
||||
not $contains type, obj.type # Array
|
||||
not $includes type, obj.type # Array
|
||||
)
|
||||
throw new Error "unexpected type: got #{obj.type} instead of #{type}"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user