inspect-js / inspect-js/is-arrow-function
False positive on object methods with arrow functions inside
Open
bug
- Dominant language
- JavaScript
- Stars
- 24
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
```js
const isArrow = require('is-arrow-function')
const x = {
foo() {
return 42
},
bar() {
return (() => 10)()
},
buz() {
// if this was an arrow function, it would have included => in it
return 123
},
}
console.log(x.foo(), x.bar(), x.buz())
console.log(isArrow(x.foo))
console.log(isArrow(x.bar)) // fail
console.log(isArrow(x.buz)) // fail
```
Contributor guide
Assessment
This issue has not been assessed yet.