'a'
mh-two-thousand-and-two
2024-04-12 44d2c92345cd156a59fc327b3060292a282d2893
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
'use strict';
 
var hasOwn = require('hasown');
 
var isInteger = require('../isInteger');
 
module.exports = function isRegExpRecord(value) {
    return !!value
        && typeof value === 'object'
        && hasOwn(value, '[[IgnoreCase]]')
        && typeof value['[[IgnoreCase]]'] === 'boolean'
        && hasOwn(value, '[[Multiline]]')
        && typeof value['[[Multiline]]'] === 'boolean'
        && hasOwn(value, '[[DotAll]]')
        && typeof value['[[DotAll]]'] === 'boolean'
        && hasOwn(value, '[[Unicode]]')
        && typeof value['[[Unicode]]'] === 'boolean'
        && hasOwn(value, '[[CapturingGroupsCount]]')
        && typeof value['[[CapturingGroupsCount]]'] === 'number'
        && isInteger(value['[[CapturingGroupsCount]]'])
        && value['[[CapturingGroupsCount]]'] >= 0
        && (!hasOwn(value, '[[UnicodeSets]]') || typeof value['[[UnicodeSets]]'] === 'boolean'); // optional since it was added later
};