Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ai-sdk/provider-utils

Package Overview
Dependencies
Maintainers
2
Versions
44
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 0.0.1 to 0.0.2

18

./dist/index.js

@@ -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

10

dist/index.d.ts

@@ -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

4

package.json
{
"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

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