This file contains 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.make(..)` is a helper/wrapper for `Object.create(..)`. Both create a new | |
// object, and optionally link that new object's `[[Prototype]]` chain to another object. | |
// | |
// But `Object.make(..)` makes sure the new object always has a `__proto__` property | |
// (even a null one) and delegation to a `isPrototypeOf(..)` method, both of which are | |
// missing from the bare object (aka "Dictionary") created by `Object.create(null)`. | |
// | |
// `isPrototypeOf()` is put on a extra object that your created object can delegate to, | |
// if any only if you create an empty object (by not passing a `linkTo`) that otherwise | |
// wouldn't have access to `isPrototypeOf()`. |