False positive on object methods with arrow functions inside
ChALkeR opened this issue · 1 comments
ChALkeR commented
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