@ai-sdk/provider-utils
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -47,3 +47,2 @@ "use strict"; | ||
safeValidateTypes: () => safeValidateTypes, | ||
scale: () => scale, | ||
validateTypes: () => validateTypes, | ||
@@ -389,18 +388,2 @@ withoutTrailingSlash: () => withoutTrailingSlash | ||
// src/scale.ts | ||
function scale({ | ||
inputMin = 0, | ||
inputMax = 1, | ||
outputMin, | ||
outputMax, | ||
value | ||
}) { | ||
if (value === void 0) { | ||
return void 0; | ||
} | ||
const inputRange = inputMax - inputMin; | ||
const outputRange = outputMax - outputMin; | ||
return (value - inputMin) * outputRange / inputRange + outputMin; | ||
} | ||
// src/uint8-utils.ts | ||
@@ -440,3 +423,2 @@ function convertBase64ToUint8Array(base64String) { | ||
safeValidateTypes, | ||
scale, | ||
validateTypes, | ||
@@ -443,0 +425,0 @@ withoutTrailingSlash |
@@ -103,10 +103,2 @@ import { JSONParseError, TypeValidationError, APICallError } from '@ai-sdk/provider'; | ||
declare function scale({ inputMin, inputMax, outputMin, outputMax, value, }: { | ||
inputMin?: number; | ||
inputMax?: number; | ||
outputMin: number; | ||
outputMax: number; | ||
value: number | undefined; | ||
}): number | undefined; | ||
declare function convertBase64ToUint8Array(base64String: string): Uint8Array; | ||
@@ -150,2 +142,2 @@ declare function convertUint8ArrayToBase64(array: Uint8Array): string; | ||
export { type ParseResult, type ResponseHandler, convertBase64ToUint8Array, convertUint8ArrayToBase64, createEventSourceResponseHandler, createJsonErrorResponseHandler, createJsonResponseHandler, generateId, getErrorMessage, isParseableJson, loadApiKey, parseJSON, postJsonToApi, postToApi, safeParseJSON, safeValidateTypes, scale, validateTypes, withoutTrailingSlash }; | ||
export { type ParseResult, type ResponseHandler, convertBase64ToUint8Array, convertUint8ArrayToBase64, createEventSourceResponseHandler, createJsonErrorResponseHandler, createJsonResponseHandler, generateId, getErrorMessage, isParseableJson, loadApiKey, parseJSON, postJsonToApi, postToApi, safeParseJSON, safeValidateTypes, validateTypes, withoutTrailingSlash }; |
@@ -47,3 +47,2 @@ "use strict"; | ||
safeValidateTypes: () => safeValidateTypes, | ||
scale: () => scale, | ||
validateTypes: () => validateTypes, | ||
@@ -389,18 +388,2 @@ withoutTrailingSlash: () => withoutTrailingSlash | ||
// src/scale.ts | ||
function scale({ | ||
inputMin = 0, | ||
inputMax = 1, | ||
outputMin, | ||
outputMax, | ||
value | ||
}) { | ||
if (value === void 0) { | ||
return void 0; | ||
} | ||
const inputRange = inputMax - inputMin; | ||
const outputRange = outputMax - outputMin; | ||
return (value - inputMin) * outputRange / inputRange + outputMin; | ||
} | ||
// src/uint8-utils.ts | ||
@@ -440,3 +423,2 @@ function convertBase64ToUint8Array(base64String) { | ||
safeValidateTypes, | ||
scale, | ||
validateTypes, | ||
@@ -443,0 +425,0 @@ withoutTrailingSlash |
{ | ||
"name": "@ai-sdk/provider-utils", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"license": "Apache-2.0", | ||
@@ -28,3 +28,3 @@ "sideEffects": false, | ||
"dependencies": { | ||
"@ai-sdk/provider": "0.0.0", | ||
"@ai-sdk/provider": "0.0.1", | ||
"eventsource-parser": "1.1.2", | ||
@@ -31,0 +31,0 @@ "nanoid": "3.3.6", |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
17
1628326
17751
+ Added@ai-sdk/provider@0.0.1(transitive)
- Removed@ai-sdk/provider@0.0.0(transitive)
Updated@ai-sdk/provider@0.0.1