Spaces:
Runtime error
Runtime error
File size: 6,267 Bytes
b5ea024 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 |
"use strict";
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
module.exports = function (t, a) {
var o, c, cg, cs, ce, ceg, ces, cew, cw, e, eg, es, ew, v, vg, vs, w, df, dfg, dfs;
o = Object.create(Object.prototype, {
c: t("c", (c = {})),
cgs: t.gs("c", (cg = function () {}), (cs = function () {})),
ce: t("ce", (ce = {})),
cegs: t.gs("ce", (ceg = function () {}), (ces = function () {})),
cew: t("cew", (cew = {})),
cw: t("cw", (cw = {})),
e: t("e", (e = {})),
egs: t.gs("e", (eg = function () {}), (es = function () {})),
ew: t("ew", (ew = {})),
v: t("", (v = {})),
vgs: t.gs("", (vg = function () {}), (vs = function () {})),
w: t("w", (w = {})),
df: t((df = {})),
dfgs: t.gs((dfg = function () {}), (dfs = function () {}))
});
return {
c: function (a) {
var d = getOwnPropertyDescriptor(o, "c");
a(d.value, c, "Value");
a(d.get, undefined, "Get");
a(d.set, undefined, "Set");
a(d.configurable, true, "Configurable");
a(d.enumerable, false, "Enumerable");
a(d.writable, false, "Writable");
d = getOwnPropertyDescriptor(o, "cgs");
a(d.value, undefined, "GS Value");
a(d.get, cg, "GS Get");
a(d.set, cs, "GS Set");
a(d.configurable, true, "GS Configurable");
a(d.enumerable, false, "GS Enumerable");
a(d.writable, undefined, "GS Writable");
},
ce: function (a) {
var d = getOwnPropertyDescriptor(o, "ce");
a(d.value, ce, "Value");
a(d.get, undefined, "Get");
a(d.set, undefined, "Set");
a(d.configurable, true, "Configurable");
a(d.enumerable, true, "Enumerable");
a(d.writable, false, "Writable");
d = getOwnPropertyDescriptor(o, "cegs");
a(d.value, undefined, "GS Value");
a(d.get, ceg, "GS Get");
a(d.set, ces, "GS Set");
a(d.configurable, true, "GS Configurable");
a(d.enumerable, true, "GS Enumerable");
a(d.writable, undefined, "GS Writable");
},
cew: function (a) {
var d = getOwnPropertyDescriptor(o, "cew");
a(d.value, cew, "Value");
a(d.get, undefined, "Get");
a(d.set, undefined, "Set");
a(d.configurable, true, "Configurable");
a(d.enumerable, true, "Enumerable");
a(d.writable, true, "Writable");
},
cw: function (a) {
var d = getOwnPropertyDescriptor(o, "cw");
a(d.value, cw, "Value");
a(d.get, undefined, "Get");
a(d.set, undefined, "Set");
a(d.configurable, true, "Configurable");
a(d.enumerable, false, "Enumerable");
a(d.writable, true, "Writable");
},
e: function (a) {
var d = getOwnPropertyDescriptor(o, "e");
a(d.value, e, "Value");
a(d.get, undefined, "Get");
a(d.set, undefined, "Set");
a(d.configurable, false, "Configurable");
a(d.enumerable, true, "Enumerable");
a(d.writable, false, "Writable");
d = getOwnPropertyDescriptor(o, "egs");
a(d.value, undefined, "GS Value");
a(d.get, eg, "GS Get");
a(d.set, es, "GS Set");
a(d.configurable, false, "GS Configurable");
a(d.enumerable, true, "GS Enumerable");
a(d.writable, undefined, "GS Writable");
},
ew: function (a) {
var d = getOwnPropertyDescriptor(o, "ew");
a(d.value, ew, "Value");
a(d.get, undefined, "Get");
a(d.set, undefined, "Set");
a(d.configurable, false, "Configurable");
a(d.enumerable, true, "Enumerable");
a(d.writable, true, "Writable");
},
v: function (a) {
var d = getOwnPropertyDescriptor(o, "v");
a(d.value, v, "Value");
a(d.get, undefined, "Get");
a(d.set, undefined, "Set");
a(d.configurable, false, "Configurable");
a(d.enumerable, false, "Enumerable");
a(d.writable, false, "Writable");
d = getOwnPropertyDescriptor(o, "vgs");
a(d.value, undefined, "GS Value");
a(d.get, vg, "GS Get");
a(d.set, vs, "GS Set");
a(d.configurable, false, "GS Configurable");
a(d.enumerable, false, "GS Enumerable");
a(d.writable, undefined, "GS Writable");
},
w: function (a) {
var d = getOwnPropertyDescriptor(o, "w");
a(d.value, w, "Value");
a(d.get, undefined, "Get");
a(d.set, undefined, "Set");
a(d.configurable, false, "Configurable");
a(d.enumerable, false, "Enumerable");
a(d.writable, true, "Writable");
},
d: function (a) {
var d = getOwnPropertyDescriptor(o, "df");
a(d.value, df, "Value");
a(d.get, undefined, "Get");
a(d.set, undefined, "Set");
a(d.configurable, true, "Configurable");
a(d.enumerable, false, "Enumerable");
a(d.writable, true, "Writable");
d = getOwnPropertyDescriptor(o, "dfgs");
a(d.value, undefined, "GS Value");
a(d.get, dfg, "GS Get");
a(d.set, dfs, "GS Set");
a(d.configurable, true, "GS Configurable");
a(d.enumerable, false, "GS Enumerable");
a(d.writable, undefined, "GS Writable");
},
Options: {
v: function (a) {
var x = {}, d = t(x, { foo: true });
a.deep(
d,
{ configurable: true, enumerable: false, writable: true, value: x, foo: true },
"No descriptor"
);
d = t("c", "foo", { marko: "elo" });
a.deep(
d,
{
configurable: true,
enumerable: false,
writable: false,
value: "foo",
marko: "elo"
},
"Descriptor"
);
},
gs: function (a) {
var gFn = function () {}, sFn = function () {}, d;
d = t.gs(gFn, sFn, { foo: true });
a.deep(
d, { configurable: true, enumerable: false, get: gFn, set: sFn, foo: true },
"No descriptor"
);
d = t.gs(null, sFn, { foo: true });
a.deep(
d,
{ configurable: true, enumerable: false, get: undefined, set: sFn, foo: true },
"No descriptor: Just set"
);
d = t.gs(gFn, { foo: true });
a.deep(
d,
{ configurable: true, enumerable: false, get: gFn, set: undefined, foo: true },
"No descriptor: Just get"
);
d = t.gs("e", gFn, sFn, { bar: true });
a.deep(
d, { configurable: false, enumerable: true, get: gFn, set: sFn, bar: true },
"Descriptor"
);
d = t.gs("e", null, sFn, { bar: true });
a.deep(
d,
{ configurable: false, enumerable: true, get: undefined, set: sFn, bar: true },
"Descriptor: Just set"
);
d = t.gs("e", gFn, { bar: true });
a.deep(
d,
{ configurable: false, enumerable: true, get: gFn, set: undefined, bar: true },
"Descriptor: Just get"
);
}
}
};
};
|