(arg, name, acceptArrayAnnotation)
| 1810 | } |
| 1811 | |
| 1812 | function assertArgFn(arg, name, acceptArrayAnnotation) { |
| 1813 | if (acceptArrayAnnotation && isArray(arg)) { |
| 1814 | arg = arg[arg.length - 1]; |
| 1815 | } |
| 1816 | |
| 1817 | assertArg(isFunction(arg), |
| 1818 | name, |
| 1819 | 'not a function, got ' + |
| 1820 | (arg && typeof arg === 'object' ? arg.constructor.name || 'Object' : typeof arg)); |
| 1821 | return arg; |
| 1822 | } |
| 1823 | |
| 1824 | /** |
| 1825 | * throw error if the name given is hasOwnProperty |
no test coverage detected