New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

fxnjs

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fxnjs - npm Package Compare versions

Comparing version 0.0.16 to 0.0.17

15

build/lib/api/services/value.js

@@ -29,3 +29,6 @@ "use strict";

return __awaiter(this, void 0, void 0, function* () {
const { value, name, storage, shape, minUploadSize: dataUrlLimit, key } = input;
const { value, name, storage, shape, minUploadSize: dataUrlLimit = 4096, key } = input;
// Null
if (value === null)
return { data: null, type: "null" };
// Value

@@ -40,2 +43,7 @@ if (isFunctionValue(value))

}
// Binary
if (value instanceof ArrayBuffer) {
const data = yield storage.upload({ name, buffer: value, type: types_1.UploadType.Value, dataUrlLimit, key });
return { data, type: "binary" };
}
// String

@@ -99,2 +107,5 @@ if (typeof (value) === "string") {

const { value: { data, type } } = input;
// Null
if (type === "null")
return null;
// Download

@@ -130,3 +141,3 @@ const buffer = yield getValueData(data);

function isFunctionValue(value) {
return value.data && value.type;
return value && value.type && value.data !== undefined; // `data` can be `null` but must exist
}

@@ -133,0 +144,0 @@ exports.isFunctionValue = isFunctionValue;

2

build/types/api/types/dtype.d.ts
/**
* Value data type.
*/
export type Dtype = "int8" | "int16" | "int32" | "int64" | "uint8" | "uint16" | "uint32" | "uint64" | "float16" | "float32" | "float64" | "bool" | "string" | "list" | "dict" | "image" | "audio" | "video" | "model" | "binary";
export type Dtype = "int8" | "int16" | "int32" | "int64" | "uint8" | "uint16" | "uint32" | "uint64" | "float16" | "float32" | "float64" | "bool" | "string" | "list" | "dict" | "image" | "audio" | "video" | "model" | "binary" | "null";

@@ -11,3 +11,3 @@ import { Dtype } from "./dtype";

[key: string]: any;
} | TypedArray;
} | TypedArray | ArrayBuffer;
/**

@@ -14,0 +14,0 @@ * Prediction value.

{
"name": "fxnjs",
"version": "0.0.16",
"version": "0.0.17",
"description": "Run AI prediction functions in your JavaScript and Node.js apps.",

@@ -5,0 +5,0 @@ "scripts": {

@@ -7,2 +7,4 @@ # Function for JavaScript

> *⚠️⚠️⚠️*: **Only use publishable access keys when using Function client-side (i.e. in the browser)**. This prevents others from extracting your keys and making predictions with your account.
## Installing Function

@@ -9,0 +11,0 @@ Function is distributed on NPM. Open a terminal and run the following command:

Sorry, the diff of this file is too big to display

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