Skip to main content
Glama
date.jsโ€ข780 B
var assert = require('assert'); var Traverse = require('traverse'); exports.dateEach = function () { var obj = { x : new Date, y : 10, z : 5 }; var counts = {}; Traverse(obj).forEach(function (node) { var t = (node instanceof Date && 'Date') || typeof node; counts[t] = (counts[t] || 0) + 1; }); assert.deepEqual(counts, { object : 1, Date : 1, number : 2, }); }; exports.dateMap = function () { var obj = { x : new Date, y : 10, z : 5 }; var res = Traverse(obj).map(function (node) { if (typeof node === 'number') this.update(node + 100); }); assert.ok(obj.x !== res.x); assert.deepEqual(res, { x : obj.x, y : 110, z : 105, }); };

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/consigcody94/office-whisperer'

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