@unisnips/ultisnips
Version:
Utilities for converting ultisnips in unisnips project
91 lines • 2.99 kB
JavaScript
;
var __values = (this && this.__values) || function(o) {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m) return m.call(o);
if (o && typeof o.length === "number") return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
};
Object.defineProperty(exports, "__esModule", { value: true });
/* eslint-disable */
function ownKeys(obj) {
var getOwnKeys;
if (typeof Reflect === 'object' && typeof Reflect.ownKeys === 'function') {
getOwnKeys = Reflect.ownKeys;
}
else if (typeof Object.getOwnPropertySymbols === 'function') {
getOwnKeys = function Reflect_ownKeys(o) {
return Object.getOwnPropertyNames(o).concat(Object.getOwnPropertySymbols(o));
};
}
else {
getOwnKeys = Object.getOwnPropertyNames;
}
return getOwnKeys(obj);
}
function copyProperties(target, source, isProto) {
var e_1, _a;
if (isProto === void 0) { isProto = false; }
try {
for (var _b = __values(ownKeys(source)), _c = _b.next(); !_c.done; _c = _b.next()) {
var key = _c.value;
if (isProto && key in target)
continue;
if (key !== 'constructor' && key !== 'prototype' && key !== 'name') {
var desc = Object.getOwnPropertyDescriptor(source, key);
if (desc) {
Object.defineProperty(target, key, desc);
}
}
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally { if (e_1) throw e_1.error; }
}
}
function mix() {
var e_2, _a;
var mixins = [];
for (var _i = 0; _i < arguments.length; _i++) {
mixins[_i] = arguments[_i];
}
var constructors = [];
var Mix = /** @class */ (function () {
function Mix() {
var _this = this;
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
constructors.forEach(function (constr) {
constr.apply(_this, args);
});
}
return Mix;
}());
try {
for (var mixins_1 = __values(mixins), mixins_1_1 = mixins_1.next(); !mixins_1_1.done; mixins_1_1 = mixins_1.next()) {
var mixin = mixins_1_1.value;
copyProperties(Mix, mixin);
}
}
catch (e_2_1) { e_2 = { error: e_2_1 }; }
finally {
try {
if (mixins_1_1 && !mixins_1_1.done && (_a = mixins_1.return)) _a.call(mixins_1);
}
finally { if (e_2) throw e_2.error; }
}
return Mix;
}
exports.mix = mix;
/* eslint-enable */
//# sourceMappingURL=class-mix.js.map