UNPKG

1.76 kBSource Map (JSON)View Raw
1{"version":3,"sources":["../src/globals.js"],"names":["realm","isCompatibleWith","MOBILE_JSC_VERSION"],"mappings":";;;;;;;AAYA;;AACA;;AACA;;AACA;;;;AAfA;;;;;;;;;AASA;AAQe,kBAASA,KAAT,EAA8B;AAC3C,uBAAyBA,KAAzB;;AACA,MAAIA,MAAMC,gBAAN,CAAuB,SAAvB,CAAJ,EAAuC;AACrC,0BAAqBD,KAArB;AACD;;AACD,MAAIA,MAAMC,gBAAN,CAAuB,QAAvB,KAAoCD,MAAMC,gBAAN,CAAuB,YAAvB,CAAxC,EAA8E;AAC5E,0BAAqBD,KAArB;AACA,0BAAqBA,KAArB;AACD;;AACD,MAAIA,MAAMC,gBAAN,CAAuBD,MAAME,kBAA7B,KAAoDF,MAAMC,gBAAN,CAAuB,QAAvB,CAAxD,EAA0F;AACxF,0BAA6BD,KAA7B;AACD;;AACD,SAAOA,KAAP;AACD","sourcesContent":["/**\n * Copyright (c) 2017-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n/* @flow strict-local */\n\nimport type { Realm } from \"./realm.js\";\nimport initializePrepackGlobals from \"./intrinsics/prepack/global.js\";\nimport initializeDOMGlobals from \"./intrinsics/dom/global.js\";\nimport initializeReactNativeGlobals from \"./intrinsics/react-native/global.js\";\nimport initializeReactMocks from \"./intrinsics/fb-www/global.js\";\n\nexport default function(realm: Realm): Realm {\n initializePrepackGlobals(realm);\n if (realm.isCompatibleWith(\"browser\")) {\n initializeDOMGlobals(realm);\n }\n if (realm.isCompatibleWith(\"fb-www\") || realm.isCompatibleWith(\"node-react\")) {\n initializeDOMGlobals(realm);\n initializeReactMocks(realm);\n }\n if (realm.isCompatibleWith(realm.MOBILE_JSC_VERSION) || realm.isCompatibleWith(\"mobile\")) {\n initializeReactNativeGlobals(realm);\n }\n return realm;\n}\n"],"file":"globals.js"}
\No newline at end of file