main
Last change
on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
481 bytes
|
Rev | Line | |
---|
[d565449] | 1 | 'use strict';
|
---|
| 2 |
|
---|
| 3 | var callBound = require('call-bind/callBound');
|
---|
| 4 |
|
---|
| 5 | var $byteLength = callBound('SharedArrayBuffer.prototype.byteLength', true);
|
---|
| 6 |
|
---|
| 7 | /** @type {import('.')} */
|
---|
| 8 | module.exports = $byteLength
|
---|
| 9 | ? function isSharedArrayBuffer(obj) {
|
---|
| 10 | if (!obj || typeof obj !== 'object') {
|
---|
| 11 | return false;
|
---|
| 12 | }
|
---|
| 13 | try {
|
---|
| 14 | $byteLength(obj);
|
---|
| 15 | return true;
|
---|
| 16 | } catch (e) {
|
---|
| 17 | return false;
|
---|
| 18 | }
|
---|
| 19 | }
|
---|
| 20 | : function isSharedArrayBuffer(obj) { // eslint-disable-line no-unused-vars
|
---|
| 21 | return false;
|
---|
| 22 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.