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
;(function() { | |
"use strict"; | |
// Utility class to enable extension of objects that cannot use | |
// normal class based inheritance e.g. custom functions | |
// | |
// Simply put, it adds a mixin static that contains all the property | |
// descriptors that class intends to pass on | |
class Mixable { | |
static mixin(target) { |
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
const { | |
defineProperties, | |
getOwnPropertyDescriptors | |
} = Object; | |
/** | |
* A root Array-like "class" compatible with both es5 and es6 styles | |
*/ | |
export function ArrayLike() { | |
if (!(this instanceof ArrayLike)) { |
OlderNewer