tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

shell.js (1222B)


      1 // GENERATED, DO NOT EDIT
      2 // file: isConstructor.js
      3 // Copyright (C) 2017 André Bargull. All rights reserved.
      4 // This code is governed by the BSD license found in the LICENSE file.
      5 
      6 /*---
      7 description: |
      8    Test if a given function is a constructor function.
      9 defines: [isConstructor]
     10 features: [Reflect.construct]
     11 ---*/
     12 
     13 function isConstructor(f) {
     14    if (typeof f !== "function") {
     15      throw new Test262Error("isConstructor invoked with a non-function value");
     16    }
     17 
     18    try {
     19        Reflect.construct(function(){}, [], f);
     20    } catch (e) {
     21        return false;
     22    }
     23    return true;
     24 }
     25 
     26 // file: nans.js
     27 // Copyright (C) 2016 the V8 project authors.  All rights reserved.
     28 // This code is governed by the BSD license found in the LICENSE file.
     29 /*---
     30 description: |
     31    A collection of NaN values produced from expressions that have been observed
     32    to create distinct bit representations on various platforms. These provide a
     33    weak basis for assertions regarding the consistent canonicalization of NaN
     34    values in Array buffers.
     35 defines: [NaNs]
     36 ---*/
     37 
     38 var NaNs = [
     39  NaN,
     40  Number.NaN,
     41  NaN * 0,
     42  0/0,
     43  Infinity/Infinity,
     44  -(0/0),
     45  Math.pow(-1, 0.5),
     46  -Math.pow(-1, 0.5),
     47  Number("Not-a-Number"),
     48 ];