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

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

// eslint-disable-next-line no-extra-parens
var $deref = /** @type {<T extends WeakKey>(thisArg: WeakRef<T>) => T | undefined} */ (callBound('WeakRef.prototype.deref', true));

/** @type {import('.')} */
module.exports = typeof WeakRef === 'undefined'
	? function isWeakRef(_value) { // eslint-disable-line no-unused-vars
		return false;
	}
	: function isWeakRef(value) {
		if (!value || typeof value !== 'object') {
			return false;
		}
		try {
			// @ts-expect-error
			$deref(value);
			return true;
		} catch (e) {
			return false;
		}
	};

Directory Contents

Dirs: 2 × Files: 9
Name Size Perms Modified Actions
.github DIR
- drwxr-xr-x 2025-03-28 11:04:36
Edit Download
test DIR
- drwxr-xr-x 2025-03-28 11:04:36
Edit Download
43 B lrw-r--r-- 2025-03-28 11:04:36
Edit Download
139 B lrw-r--r-- 2025-03-28 11:04:36
Edit Download
8.10 KB lrw-r--r-- 2025-03-28 11:04:36
Edit Download
104 B lrw-r--r-- 2025-03-28 11:04:36
Edit Download
599 B lrw-r--r-- 2025-03-28 11:04:36
Edit Download
1.04 KB lrw-r--r-- 2025-03-28 11:04:36
Edit Download
2.17 KB lrw-r--r-- 2025-03-28 11:04:36
Edit Download
1.96 KB lrw-r--r-- 2025-03-28 11:04:36
Edit Download
123 B lrw-r--r-- 2025-03-28 11:04:36
Edit Download
If ZipArchive is unavailable, a .tar will be created (no compression).