PHP 7.4.33
Preview: index.js Size: 826 B
/var/www/uibuilder.cmshelp.dk/httpdocs/node_modules/is-finalizationregistry/index.js
'use strict';

var callBound = require('call-bound');

/** @type {undefined | ((value: ThisParameterType<typeof FinalizationRegistry.prototype.register>, ...args: Parameters<typeof FinalizationRegistry.prototype.register>) => ReturnType<typeof FinalizationRegistry.prototype.register>)} */
var $register = callBound('FinalizationRegistry.prototype.register', true);

/** @type {import('.')} */
module.exports = $register
	? function isFinalizationRegistry(value) {
		if (!value || typeof value !== 'object') {
			return false;
		}
		try {
			// @ts-expect-error TS can't figure out that it's always truthy here
			$register(value, {}, null);
			return true;
		} catch (e) {
			return false;
		}
	}
	// @ts-ignore unused var
	: function isFinalizationRegistry(value) { // eslint-disable-line no-unused-vars
		return false;
	};

Directory Contents

Dirs: 2 × Files: 9
Name Size Perms Modified Actions
.github DIR
- drwxr-xr-x 2025-03-28 11:04:35
Edit Download
test DIR
- drwxr-xr-x 2025-03-28 11:04:35
Edit Download
78 B lrw-r--r-- 2025-03-28 11:04:35
Edit Download
139 B lrw-r--r-- 2025-03-28 11:04:35
Edit Download
8.16 KB lrw-r--r-- 2025-03-28 11:04:35
Edit Download
138 B lrw-r--r-- 2025-03-28 11:04:35
Edit Download
826 B lrw-r--r-- 2025-03-28 11:04:35
Edit Download
1.04 KB lrw-r--r-- 2025-03-28 11:04:35
Edit Download
2.27 KB lrw-r--r-- 2025-03-28 11:04:35
Edit Download
2.57 KB lrw-r--r-- 2025-03-28 11:04:35
Edit Download
123 B lrw-r--r-- 2025-03-28 11:04:35
Edit Download
If ZipArchive is unavailable, a .tar will be created (no compression).