-
Notifications
You must be signed in to change notification settings - Fork 834
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Size reduced from 87.35 KB to 79.43 KB
- Loading branch information
Showing
18 changed files
with
735 additions
and
768 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
const _Object = Object | ||
|
||
module.exports = function createClass() { | ||
function defineProperties(target, props) { | ||
for (var i = 0; i < props.length; i++) { | ||
var descriptor = props[i]; | ||
descriptor.enumerable = descriptor.enumerable || false; | ||
descriptor.configurable = true; | ||
if ("value" in descriptor) descriptor.writable = true; | ||
_Object.defineProperty(target, descriptor.key, descriptor); | ||
} | ||
} | ||
|
||
return function (Constructor, protoProps, staticProps) { | ||
if (protoProps) defineProperties(Constructor.prototype, protoProps); | ||
if (staticProps) defineProperties(Constructor, staticProps); | ||
return Constructor; | ||
}; | ||
}(); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
const _Object = Object | ||
|
||
module.exports = _Object.assign || function (target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i]; | ||
|
||
for (var key in source) { | ||
if (Object.prototype.hasOwnProperty.call(source, key)) { | ||
target[key] = source[key]; | ||
} | ||
} | ||
} | ||
|
||
return 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
const _Object = Object | ||
|
||
module.exports = function inherits(subClass, superClass) { | ||
if (typeof superClass !== "function" && superClass !== null) { | ||
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); | ||
} | ||
|
||
subClass.prototype = _Object.create(superClass && superClass.prototype, { | ||
constructor: { | ||
value: subClass, | ||
enumerable: false, | ||
writable: true, | ||
configurable: true | ||
} | ||
}); | ||
if (superClass) { | ||
_Object.setPrototypeOf ? _Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; | ||
} | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
const _Object = Object | ||
|
||
module.exports = _Object.getPrototypeOf || function (O) { | ||
O = Object(O) | ||
|
||
if (typeof O.constructor === 'function' && O instanceof O.constructor) { | ||
return O.constructor.prototype | ||
} | ||
|
||
return O instanceof Object ? Object.prototype : null | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module.exports = function possibleConstructorReturn(self, call) { | ||
if (!self) { | ||
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | ||
} | ||
|
||
return call && (typeof call === "object" || typeof call === "function") ? call : self; | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
const _String = String | ||
|
||
module.exports = _String.fromCodePoint || function stringFromCodePoint() { | ||
var MAX_SIZE = 0x4000; | ||
var codeUnits = []; | ||
var highSurrogate; | ||
var lowSurrogate; | ||
var index = -1; | ||
var length = arguments.length; | ||
if (!length) { | ||
return ''; | ||
} | ||
var result = ''; | ||
while (++index < length) { | ||
var codePoint = Number(arguments[index]); | ||
if ( | ||
!isFinite(codePoint) || // `NaN`, `+Infinity`, or `-Infinity` | ||
codePoint < 0 || // not a valid Unicode code point | ||
codePoint > 0x10FFFF || // not a valid Unicode code point | ||
Math.floor(codePoint) != codePoint // not an integer | ||
) { | ||
throw RangeError('Invalid code point: ' + codePoint); | ||
} | ||
if (codePoint <= 0xFFFF) { // BMP code point | ||
codeUnits.push(codePoint); | ||
} else { // Astral code point; split in surrogate halves | ||
// http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae | ||
codePoint -= 0x10000; | ||
highSurrogate = (codePoint >> 10) + 0xD800; | ||
lowSurrogate = (codePoint % 0x400) + 0xDC00; | ||
codeUnits.push(highSurrogate, lowSurrogate); | ||
} | ||
if (index + 1 === length || codeUnits.length > MAX_SIZE) { | ||
result += String.fromCharCode.apply(null, codeUnits); | ||
codeUnits.length = 0; | ||
} | ||
} | ||
return result; | ||
}; |
Oops, something went wrong.