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:
535 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
2 |
|
---|
3 | var hasOwn = require('hasown');
|
---|
4 | var isDataView = require('is-data-view');
|
---|
5 |
|
---|
6 | var isInteger = require('../isInteger');
|
---|
7 |
|
---|
8 | module.exports = function isDataViewWithBufferWitnessRecord(value) {
|
---|
9 | return !!value
|
---|
10 | && typeof value === 'object'
|
---|
11 | && hasOwn(value, '[[Object]]')
|
---|
12 | && hasOwn(value, '[[CachedBufferByteLength]]')
|
---|
13 | && (
|
---|
14 | (isInteger(value['[[CachedBufferByteLength]]']) && value['[[CachedBufferByteLength]]'] >= 0)
|
---|
15 | || value['[[CachedBufferByteLength]]'] === 'DETACHED'
|
---|
16 | )
|
---|
17 | && isDataView(value['[[Object]]']);
|
---|
18 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.