(types, name, obj)
| 2 | import isPlainObject from './isPlainObject' |
| 3 | |
| 4 | function typecheck(types, name, obj) { |
| 5 | invariant( |
| 6 | Array.isArray(types) |
| 7 | ? types.some(t => typeof obj === t) |
| 8 | : typeof obj === types, |
| 9 | `${name} must be ${Array.isArray(types) ? 'one of' : 'a'} ${types}. Instead received a %s.`, |
| 10 | typeof obj |
| 11 | ) |
| 12 | } |
| 13 | |
| 14 | const checks = { |
| 15 | buildRequest(fn) { |
no outgoing calls
no test coverage detected
searching dependent graphs…