main
Last change
on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
560 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
2 |
|
---|
3 | var hasOwn = require('hasown');
|
---|
4 |
|
---|
5 | // https://262.ecma-international.org/13.0/#sec-match-records
|
---|
6 |
|
---|
7 | module.exports = function isMatchRecord(record) {
|
---|
8 | return (
|
---|
9 | !!record
|
---|
10 | && typeof record === 'object'
|
---|
11 | && hasOwn(record, '[[StartIndex]]')
|
---|
12 | && hasOwn(record, '[[EndIndex]]')
|
---|
13 | && record['[[StartIndex]]'] >= 0
|
---|
14 | && record['[[EndIndex]]'] >= record['[[StartIndex]]']
|
---|
15 | && String(parseInt(record['[[StartIndex]]'], 10)) === String(record['[[StartIndex]]'])
|
---|
16 | && String(parseInt(record['[[EndIndex]]'], 10)) === String(record['[[EndIndex]]'])
|
---|
17 | );
|
---|
18 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.