types: remove JSPerf references
This commit is contained in:
parent
01a96e887c
commit
967e724b47
1 changed files with 0 additions and 4 deletions
|
@ -1,12 +1,10 @@
|
|||
module.exports = function enforce(type, value) {
|
||||
switch (type) {
|
||||
// http://jsperf.com/array-typecheck-2
|
||||
case 'Array': {
|
||||
if (Array.isArray(value)) return
|
||||
break
|
||||
}
|
||||
|
||||
// http://jsperf.com/boolean-typecheck
|
||||
case 'Boolean': {
|
||||
if (typeof value === 'boolean') return
|
||||
break
|
||||
|
@ -17,13 +15,11 @@ module.exports = function enforce(type, value) {
|
|||
break
|
||||
}
|
||||
|
||||
// http://jsperf.com/number-constructor-v-isnan
|
||||
case 'Number': {
|
||||
if (typeof value === 'number') return
|
||||
break
|
||||
}
|
||||
|
||||
// http://jsperf.com/string-typecheck-2
|
||||
case 'String': {
|
||||
if (typeof value === 'string') return
|
||||
break
|
||||
|
|
Loading…
Add table
Reference in a new issue