Skip to main content
Glama
omitdefault.js795 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.omitDefault = void 0; /** * Returns the given input. If the input is the default value * of protobuf, undefined is retunred. Use this when creating Amino JSON converters. */ function omitDefault(input) { switch (typeof input) { case "string": return input === "" ? undefined : input; case "number": return input === 0 ? undefined : input; case "bigint": return input === BigInt(0) ? undefined : input; case "boolean": return !input ? undefined : input; default: throw new Error(`Got unsupported type '${typeof input}'`); } } exports.omitDefault = omitDefault; //# sourceMappingURL=omitdefault.js.map

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/MyronKoch-dev/osmosis-mcp-server'

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