UNPKG

prepack

Version:

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

34 lines (26 loc) 974 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = _default; var _index = require("../../values/index.js"); var _singletons = require("../../singletons.js"); /** * 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(realm) { // ECMA262 18.2.3 return new _index.NativeFunctionValue(realm, "isNaN", "isNaN", 1, (context, [number]) => { // 1. Let num be ? ToNumber(number). let num = _singletons.To.ToNumber(realm, number); // 2. If num is NaN, return true. if (isNaN(num)) return realm.intrinsics.true; // 3. Otherwise, return false. return realm.intrinsics.false; }, false); } //# sourceMappingURL=isNaN.js.map