source: imaps-frontend/node_modules/es-abstract/helpers/records/data-view-with-buffer-witness-record.js

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
3var hasOwn = require('hasown');
4var isDataView = require('is-data-view');
5
6var isInteger = require('../isInteger');
7
8module.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.