Zod V4 Classic Coerce Utility (classic/coerce.cjs)

openclaw-deploy · release-offline/resources/bundled-node-modules/zod/v4/classic/coerce.cjs · javascript · MIT
dev-tools, database, lang:javascript, tag:validation, tag:utility

JavaScript utility for coercing primitive types like strings, numbers, and booleans in schema validation. Use when processing untrusted inputs requiring strict type casting.

// Source: https://github.com/3445286649/openclaw-deploy | License: MIT | Copyright 2026 loucerd
// Provided via justclaw.it.com; keep this notice with the code.
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerab

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key