(gen: CodeGen)
| 31 | } |
| 32 | |
| 33 | export function hasPropFunc(gen: CodeGen): Name { |
| 34 | return gen.scopeValue("func", { |
| 35 | // eslint-disable-next-line @typescript-eslint/unbound-method |
| 36 | ref: Object.prototype.hasOwnProperty, |
| 37 | code: _`Object.prototype.hasOwnProperty`, |
| 38 | }) |
| 39 | } |
| 40 | |
| 41 | export function isOwnProperty(gen: CodeGen, data: Name, property: Name | string): Code { |
| 42 | return _`${hasPropFunc(gen)}.call(${data}, ${property})` |
no test coverage detected
searching dependent graphs…