Skip to main content
Glama
index.js•696 B
'use strict'; var test = require('tape'); var inspect = require('object-inspect'); var forEach = require('for-each'); var isWeakRef = require('..'); test('isWeakRef', function (t) { t.equal(typeof isWeakRef, 'function', 'is a function'); var nonWeakRefs = [undefined, null, true, false, 42, 0, Infinity, NaN, /a/g, function () {}, {}, []]; forEach(nonWeakRefs, function (nonWeakRef) { t.equal(isWeakRef(nonWeakRef), false, inspect(nonWeakRef) + ' is not a WeakRef'); }); t.test('actual WeakRefs', { skip: typeof WeakRef === 'undefined' }, function (st) { var ref = new WeakRef({}); st.equal(isWeakRef(ref), true, inspect(ref) + ' is a WeakRef'); st.end(); }); t.end(); });

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/guangxiangdebizi/PPT-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server