You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I鈥檓 wondering whether it makes sense to change IsObject() in the wrapper so that napi_function is also allowed, because functions are objects in the JS sense and any N-API operation that expects an object should also work on a function. What do you think?
Activity
jasongin commentedon Jan 2, 2018
I agree, it seems like a bug.
IsObject()should be true for functions.mhdawson commentedon Jan 3, 2018
I agree as well. IsObject() should return true for a function.
guymguym commentedon Jan 3, 2018
Hey, sounds good to me.
btw you might consider having the original IsObject meaning as IsObjectLike the same as done by lodash:
https://lodash.com/docs/4.17.4#isObject
https://lodash.com/docs/4.17.4#isObjectLike
Make IsObject() allow functions
Make IsObject() allow functions
addaleax commentedon May 15, 2018
This has been fixed a while ago, the PR author just didn鈥檛 add a
Fixes:tag. Closing! :)Make IsObject() allow functions
Make IsObject() allow functions
Make IsObject() allow functions
Make IsObject() allow functions