
Security News
Node.js Considers Public Workflow for Security Reports Amid AI-Driven Surge
Node.js is debating whether AI-driven security report volume warrants moving more vulnerability reports into public workflows.
@ariestools/zod
Advanced tools
Base functionality used throughout XY Labs TypeScript/JavaScript libraries
Using npm:
npm install {{name}}
Using yarn:
yarn add {{name}}
Using pnpm:
pnpm add {{name}}
Using bun:
bun add {{name}}
See the LICENSE file for license rights and limitations (LGPL-3.0-only).
### .temp-typedoc
### functions
### <a id="zodAllFactory"></a>zodAllFactory
function zodAllFactory<T, TName>(zod, name): object;
Alpha
Creates a bundle of is, as, and to factory functions for a given zod schema.
T
TName extends string
ZodType<T>
The zod schema to validate against
TName
The name used to suffix the generated function names (e.g. 'Address' produces isAddress, asAddress, toAddress)
object
An object containing is<Name>, as<Name>, and to<Name> functions
### <a id="zodAsAsyncFactory"></a>zodAsAsyncFactory
function zodAsAsyncFactory<TZod>(zod, name): {
<T> (value): Promise<T & TZod | undefined>;
<T> (value, assert): Promise<T & TZod>;
};
Creates an async function that validates a value against a zod schema and returns it with a narrowed type.
Uses safeParseAsync for schemas with async refinements. When called without an assert config, returns undefined on failure.
TZod
ZodType<TZod>
The zod schema to validate against
string
A name used in error messages for identification
An async function that validates and narrows the type of a value
{
<T> (value): Promise<T & TZod | undefined>;
<T> (value, assert): Promise<T & TZod>;
}
### <a id="zodAsFactory"></a>zodAsFactory
function zodAsFactory<TZod>(zod, name): {
<T> (value): T & TZod | undefined;
<T> (value, assert): T & TZod;
};
Creates a function that validates a value against a zod schema and returns it with a narrowed type. When called without an assert config, returns undefined on failure. When called with an assert config, throws on failure.
TZod
ZodType<TZod>
The zod schema to validate against
string
A name used in error messages for identification
A function that validates and narrows the type of a value
{
<T> (value): T & TZod | undefined;
<T> (value, assert): T & TZod;
}
### <a id="zodIsFactory"></a>zodIsFactory
function zodIsFactory<TZod>(zod): <T>(value) => value is T & TZod;
Creates a type guard function that checks if a value matches a zod schema.
TZod
ZodType<TZod>
The zod schema to validate against
A type guard function that returns true if the value passes validation
<T>(value) => value is T & TZod
### <a id="zodToAsyncFactory"></a>zodToAsyncFactory
function zodToAsyncFactory<TZod>(zod, name): {
<T> (value): Promise<T & TZod | undefined>;
<T> (value, assert): Promise<T & TZod>;
};
Creates an async function that converts a value to the zod schema type, delegating to zodAsAsyncFactory internally.
Provides overloads for optional assertion: without assert config resolves to undefined on failure, with assert config throws on failure.
TZod
ZodType<TZod>
The zod schema to validate against
string
A name used in error messages for identification
An async function that validates and converts a value to the schema type
{
<T> (value): Promise<T & TZod | undefined>;
<T> (value, assert): Promise<T & TZod>;
}
### <a id="zodToFactory"></a>zodToFactory
function zodToFactory<TZod>(zod, name): {
<T> (value): T & TZod | undefined;
<T> (value, assert): T & TZod;
};
Creates a function that converts a value to the zod schema type, delegating to zodAsFactory internally.
Provides overloads for optional assertion: without assert config returns undefined on failure, with assert config throws on failure.
TZod
ZodType<TZod>
The zod schema to validate against
string
A name used in error messages for identification
A function that validates and converts a value to the schema type
{
<T> (value): T & TZod | undefined;
<T> (value, assert): T & TZod;
}
### interfaces
### <a id="ZodFactoryConfigObject"></a>ZodFactoryConfigObject
Configuration object for zod factory functions, providing a name for error messages.
name: string;
### type-aliases
### <a id="AllZodFactories"></a>AllZodFactories
type AllZodFactories<TType, TName> = Record<`is${TName}`, ReturnType<typeof zodIsFactory>> & Record<`as${TName}`, ReturnType<typeof zodAsFactory>> & Record<`to${TName}`, ReturnType<typeof zodToFactory>>;
Alpha
TType
TName extends string
### <a id="ZodFactoryConfig"></a>ZodFactoryConfig
type ZodFactoryConfig =
| AssertConfig
| ZodFactoryConfigObject;
Configuration for zod factory assertion behavior, either an AssertConfig or a named config object.
FAQs
Private workspace package consumed by @ariestools/sdk
We found that @ariestools/zod demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Node.js is debating whether AI-driven security report volume warrants moving more vulnerability reports into public workflows.

Security News
PolinRider expands across npm, Packagist, Go modules, and Chrome extensions, using hidden loaders to target developer environments.

Security News
Open source attacks are accelerating as AI coding agents pull in dependencies faster, with less human review.