Use lodash.includes instead of lodash.contains.

This commit is contained in:
Julien Fontanet 2015-04-20 16:26:14 +02:00
parent 76d54b8914
commit 1a21989ad1
2 changed files with 3 additions and 3 deletions

View File

@ -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",

View File

@ -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}"