main
Last change
on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
853 bytes
|
Line | |
---|
1 | var superPropBase = require("./superPropBase.js");
|
---|
2 | var defineProperty = require("./defineProperty.js");
|
---|
3 | function set(e, r, t, o) {
|
---|
4 | return set = "undefined" != typeof Reflect && Reflect.set ? Reflect.set : function (e, r, t, o) {
|
---|
5 | var f,
|
---|
6 | i = superPropBase(e, r);
|
---|
7 | if (i) {
|
---|
8 | if ((f = Object.getOwnPropertyDescriptor(i, r)).set) return f.set.call(o, t), !0;
|
---|
9 | if (!f.writable) return !1;
|
---|
10 | }
|
---|
11 | if (f = Object.getOwnPropertyDescriptor(o, r)) {
|
---|
12 | if (!f.writable) return !1;
|
---|
13 | f.value = t, Object.defineProperty(o, r, f);
|
---|
14 | } else defineProperty(o, r, t);
|
---|
15 | return !0;
|
---|
16 | }, set(e, r, t, o);
|
---|
17 | }
|
---|
18 | function _set(e, r, t, o, f) {
|
---|
19 | if (!set(e, r, t, o || e) && f) throw new TypeError("failed to set property");
|
---|
20 | return t;
|
---|
21 | }
|
---|
22 | module.exports = _set, module.exports.__esModule = true, module.exports["default"] = module.exports; |
---|
Note:
See
TracBrowser
for help on using the repository browser.