|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
517 bytes
|
| Line | |
|---|
| 1 | 'use strict';
|
|---|
| 2 |
|
|---|
| 3 | var $TypeError = require('es-errors/type');
|
|---|
| 4 |
|
|---|
| 5 | var isRegExpRecord = require('../helpers/records/regexp-record');
|
|---|
| 6 |
|
|---|
| 7 | // https://262.ecma-international.org/15.0/#sec-runtime-semantics-haseitherunicodeflag-abstract-operation
|
|---|
| 8 |
|
|---|
| 9 | module.exports = function HasEitherUnicodeFlag(rer) {
|
|---|
| 10 | if (!isRegExpRecord(rer)) {
|
|---|
| 11 | throw new $TypeError('Assertion failed: `rer` must be a RegExp Record');
|
|---|
| 12 | }
|
|---|
| 13 |
|
|---|
| 14 | if (rer['[[Unicode]]'] || rer['[[UnicodeSets]]']) { // step 1
|
|---|
| 15 | return true; // step 1.a
|
|---|
| 16 | }
|
|---|
| 17 | return false; // step 2
|
|---|
| 18 | };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.