|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 2 weeks ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
1.3 KB
|
| Rev | Line | |
|---|
| [9af201e] | 1 | "use strict";
|
|---|
| 2 |
|
|---|
| 3 | exports.__esModule = true;
|
|---|
| 4 | exports.default = createMetaResolver;
|
|---|
| 5 | var _utils = require("./utils");
|
|---|
| 6 | function createMetaResolver(polyfills) {
|
|---|
| 7 | const {
|
|---|
| 8 | static: staticP,
|
|---|
| 9 | instance: instanceP,
|
|---|
| 10 | global: globalP
|
|---|
| 11 | } = polyfills;
|
|---|
| 12 | return meta => {
|
|---|
| 13 | if (meta.kind === "global" && globalP && (0, _utils.has)(globalP, meta.name)) {
|
|---|
| 14 | return {
|
|---|
| 15 | kind: "global",
|
|---|
| 16 | desc: globalP[meta.name],
|
|---|
| 17 | name: meta.name
|
|---|
| 18 | };
|
|---|
| 19 | }
|
|---|
| 20 | if (meta.kind === "property" || meta.kind === "in") {
|
|---|
| 21 | const {
|
|---|
| 22 | placement,
|
|---|
| 23 | object,
|
|---|
| 24 | key
|
|---|
| 25 | } = meta;
|
|---|
| 26 | if (object && placement === "static") {
|
|---|
| 27 | if (globalP && _utils.PossibleGlobalObjects.has(object) && (0, _utils.has)(globalP, key)) {
|
|---|
| 28 | return {
|
|---|
| 29 | kind: "global",
|
|---|
| 30 | desc: globalP[key],
|
|---|
| 31 | name: key
|
|---|
| 32 | };
|
|---|
| 33 | }
|
|---|
| 34 | if (staticP && (0, _utils.has)(staticP, object) && (0, _utils.has)(staticP[object], key)) {
|
|---|
| 35 | return {
|
|---|
| 36 | kind: "static",
|
|---|
| 37 | desc: staticP[object][key],
|
|---|
| 38 | name: `${object}$${key}`
|
|---|
| 39 | };
|
|---|
| 40 | }
|
|---|
| 41 | }
|
|---|
| 42 | if (instanceP && (0, _utils.has)(instanceP, key)) {
|
|---|
| 43 | return {
|
|---|
| 44 | kind: "instance",
|
|---|
| 45 | desc: instanceP[key],
|
|---|
| 46 | name: `${key}`
|
|---|
| 47 | };
|
|---|
| 48 | }
|
|---|
| 49 | }
|
|---|
| 50 | };
|
|---|
| 51 | } |
|---|
Note:
See
TracBrowser
for help on using the repository browser.