Something along the lines of Symbol.iterator protocol for defining callback objects i.e: Symbol.callable:
const obj = {
[Symbol.callable]: function (...args) { return
this[Symbol.for('value')] },
[Symbol.for(''value')]: 'value',
}
assert(obj() === 'value')
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

