GianlucaGuarini / icaro

Smart and efficient javascript object observer, ideal for batching DOM updates (~1kb)
MIT License
573 stars 29 forks source link

dont register invalid listen function #9

Closed nrgwsth closed 7 years ago

nrgwsth commented 7 years ago

if someone passes an invalid listener function, it will throw an error during key change,

const i = icaro() i.listen({}) i.foo = bar //TypeError: fn is not a function

GianlucaGuarini commented 7 years ago

thank you it makes totally sense. Please fix the issues and the eslint errors and I will merge it

nrgwsth commented 7 years ago

fixed linting errors.

GianlucaGuarini commented 7 years ago

@anuragasaurus one last thing... could you add a test for this issue please?

nrgwsth commented 7 years ago

yeah, sure

GianlucaGuarini commented 7 years ago

awesome thank you