Socket
Socket
Sign inDemoInstall

@ai-sdk/provider-utils

Package Overview
Dependencies
Maintainers
2
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ai-sdk/provider-utils - npm Package Compare versions

Comparing version 1.0.15 to 1.0.16

18

dist/index.d.ts

@@ -1,2 +0,2 @@

import { JSONParseError, TypeValidationError, APICallError } from '@ai-sdk/provider';
import { JSONValue, JSONParseError, TypeValidationError, APICallError } from '@ai-sdk/provider';
import { z, ZodSchema } from 'zod';

@@ -108,7 +108,8 @@

* @param text - The JSON string to parse.
* @returns {unknown} - The parsed JSON object.
* @returns {JSONValue} - The parsed JSON object.
*/
declare function parseJSON({ text }: {
declare function parseJSON(options: {
text: string;
}): unknown;
schema?: undefined;
}): JSONValue;
/**

@@ -122,3 +123,3 @@ * Parses a JSON string into a strongly-typed object using the provided schema.

*/
declare function parseJSON<T>({ text, schema, }: {
declare function parseJSON<T>(options: {
text: string;

@@ -140,5 +141,6 @@ schema: ZodSchema<T> | Validator<T>;

*/
declare function safeParseJSON({ text }: {
declare function safeParseJSON(options: {
text: string;
}): ParseResult<unknown>;
schema?: undefined;
}): ParseResult<JSONValue>;
/**

@@ -152,3 +154,3 @@ * Safely parses a JSON string into a strongly-typed object, using a provided schema to validate the object.

*/
declare function safeParseJSON<T>({ text, schema, }: {
declare function safeParseJSON<T>(options: {
text: string;

@@ -155,0 +157,0 @@ schema: ZodSchema<T> | Validator<T>;

{
"name": "@ai-sdk/provider-utils",
"version": "1.0.15",
"version": "1.0.16",
"license": "Apache-2.0",

@@ -5,0 +5,0 @@ "sideEffects": false,

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc