2019-09-18 18:39:12 +02:00
|
|
|
// Copyright 2019 Ron Buckton. All rights reserved.
|
|
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
|
|
|
|
/*---
|
|
|
|
description: The groups object of indices is created unconditionally.
|
|
|
|
includes: [propertyHelper.js]
|
|
|
|
esid: sec-makeindicesarray
|
2019-10-08 20:38:39 +02:00
|
|
|
features: [regexp-named-groups, regexp-match-indices]
|
2019-09-18 18:39:12 +02:00
|
|
|
info: |
|
2021-01-15 08:06:42 +01:00
|
|
|
MakeIndicesArray ( S, indices, groupNames, hasGroups )
|
|
|
|
10. If _hasGroups_ is *true*, then
|
2019-09-18 18:39:12 +02:00
|
|
|
a. Let _groups_ be ! ObjectCreate(*null*).
|
2021-01-15 08:06:42 +01:00
|
|
|
11. Else,
|
2019-09-18 18:39:12 +02:00
|
|
|
a. Let _groups_ be *undefined*.
|
2021-01-15 08:06:42 +01:00
|
|
|
12. Perform ! CreateDataProperty(_A_, `"groups"`, _groups_).
|
2019-09-18 18:39:12 +02:00
|
|
|
---*/
|
|
|
|
|
|
|
|
|
2021-01-15 08:06:42 +01:00
|
|
|
const re = /./d;
|
2019-09-18 18:39:12 +02:00
|
|
|
const indices = re.exec("a").indices;
|
|
|
|
verifyProperty(indices, 'groups', {
|
|
|
|
writable: true,
|
|
|
|
enumerable: true,
|
|
|
|
configurable: true,
|
|
|
|
value: undefined
|
|
|
|
});
|