This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // This event emitter emits events, but reserves the right to publish events to | |
| // for its creator. It uses a WeakMap for true encapsulation. | |
| const eesToEventMaps = new WeakMap(); | |
| export default class EventEmitter { | |
| constructor(publisher) { | |
| const eventMap = Object.create(null); | |
| eesToEventMaps.set(this, eventMap); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * object.watch polyfill | |
| * | |
| * 2012-04-03 | |
| * | |
| * By Eli Grey, http://eligrey.com | |
| * Public Domain. | |
| * NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. | |
| */ |