tor-browser

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

indices-array.js (553B)


      1 // Copyright 2019 Ron Buckton. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 description: The "indices" property is an Array.
      6 esid: sec-makeindicesarray
      7 features: [regexp-match-indices]
      8 info: |
      9  MakeIndicesArray ( S, indices, groupNames, hasGroups )
     10    6. Set _A_ to ! ArrayCreate(_n_).
     11 ---*/
     12 
     13 let match = /a/d.exec("a");
     14 let indices = match.indices;
     15 
     16 // `indices` is an array
     17 assert.sameValue(Object.getPrototypeOf(indices), Array.prototype);
     18 assert(Array.isArray(indices));
     19 
     20 reportCompare(0, 0);