Skip to content

Instantly share code, notes, and snippets.

@gomo
Last active June 29, 2017 02:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gomo/474b14bbf8955e0a20d56902eafd0fb8 to your computer and use it in GitHub Desktop.
Save gomo/474b14bbf8955e0a20d56902eafd0fb8 to your computer and use it in GitHub Desktop.
A function in a plane object is the named function in nodejs (v6.10.2).
const obj = {
foobar: function(){}
}
obj.foobar.toString() == (function(){}).toString() //false
obj.foobar.toString() == (function foobar(){}).toString() //true
obj.foobar.toString() //function foobar() {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment