UNPKG

prepack

Version:

Execute a JS bundle, serialize global state and side effects to a snapshot that can be quickly restored.

35 lines (27 loc) 1 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = _default; var _singletons = require("../singletons.js"); var _invariant = _interopRequireDefault(require("../invariant.js")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * Copyright (c) 2017-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ /* strict-local */ function _default(ast, strictCode, env, realm) { (0, _invariant.default)(ast.expressions.length > 0); let val; for (let node of ast.expressions) { val = _singletons.Environment.GetValue(realm, env.evaluate(node, strictCode)); } (0, _invariant.default)(val !== undefined); return val; } //# sourceMappingURL=SequenceExpression.js.map