mirror of
https://github.com/swc-project/swc.git
synced 2024-12-21 12:41:54 +03:00
49 lines
1.8 KiB
JavaScript
49 lines
1.8 KiB
JavaScript
function _defineProperties(target, props) {
|
|
for(var i = 0; i < props.length; i++){
|
|
var descriptor = props[i];
|
|
descriptor.enumerable = descriptor.enumerable || !1, descriptor.configurable = !0, "value" in descriptor && (descriptor.writable = !0), Object.defineProperty(target, descriptor.key, descriptor);
|
|
}
|
|
}
|
|
function _toConsumableArray(arr) {
|
|
return (function(arr) {
|
|
if (Array.isArray(arr)) {
|
|
for(var i = 0, arr2 = new Array(arr.length); i < arr.length; i++)arr2[i] = arr[i];
|
|
return arr2;
|
|
}
|
|
})(arr) || (function(iter) {
|
|
if (Symbol.iterator in Object(iter) || "[object Arguments]" === Object.prototype.toString.call(iter)) return Array.from(iter);
|
|
})(arr) || (function() {
|
|
throw new TypeError("Invalid attempt to spread non-iterable instance");
|
|
})();
|
|
}
|
|
var tmp = Symbol.iterator, SymbolIterator = function() {
|
|
"use strict";
|
|
var Constructor, protoProps, staticProps;
|
|
function SymbolIterator() {
|
|
!function(instance, Constructor) {
|
|
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
|
|
}(this, SymbolIterator);
|
|
}
|
|
return Constructor = SymbolIterator, protoProps = [
|
|
{
|
|
key: "next",
|
|
value: function() {
|
|
return {
|
|
value: Symbol(),
|
|
done: !1
|
|
};
|
|
}
|
|
},
|
|
{
|
|
key: tmp,
|
|
value: function() {
|
|
return this;
|
|
}
|
|
}
|
|
], _defineProperties(Constructor.prototype, protoProps), staticProps && _defineProperties(Constructor, staticProps), SymbolIterator;
|
|
}();
|
|
_toConsumableArray([
|
|
0,
|
|
1
|
|
]).concat(_toConsumableArray(new SymbolIterator));
|