Introspect bind function targets

Sultan thysultan at gmail.com
Mon Feb 4 17:37:52 UTC 2019


A way to determine if two bound functions reference the same target
function.

For example:

function proto () {}

const a = proto.bind(null, 1)
const b = proto.bind(null, 2)

console.assert(Function.isSameTarget(a, b))
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20190204/6c46ecf9/attachment.html>


More information about the es-discuss mailing list