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:
469 bytes
|
Rev | Line | |
---|
[d565449] | 1 | 'use strict';
|
---|
| 2 |
|
---|
| 3 | var callBound = require('call-bind/callBound');
|
---|
| 4 |
|
---|
| 5 | var $register = callBound('FinalizationRegistry.prototype.register', true);
|
---|
| 6 |
|
---|
| 7 | module.exports = $register
|
---|
| 8 | ? function isFinalizationRegistry(value) {
|
---|
| 9 | if (!value || typeof value !== 'object') {
|
---|
| 10 | return false;
|
---|
| 11 | }
|
---|
| 12 | try {
|
---|
| 13 | $register(value, {});
|
---|
| 14 | return true;
|
---|
| 15 | } catch (e) {
|
---|
| 16 | return false;
|
---|
| 17 | }
|
---|
| 18 | }
|
---|
| 19 | : function isFinalizationRegistry(value) { // eslint-disable-line no-unused-vars
|
---|
| 20 | return false;
|
---|
| 21 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.