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

isomorphic-onnxruntime

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

isomorphic-onnxruntime

Isomorphic wrapper for onnxruntime libraries

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

✨ Isomorphic ONNX Runtime for Web and Node

This library is a thin wrapper around the ONNX Runtime that allows you to ship almost same code for each platform. All it does is imports right version of the ONNX Runtime and exposes it to you as if it was a single library.

Installation

[!CAUTION] Tested only with 1.16.x version of the ONNX Runtime. Other versions may not work, but library is straightforward and should work with most future versions.

yarn install isomorphic-onnxruntime onnxruntime-common onnxruntime-web onnxruntime-node

Usage

Usage is straightforward. You just import the library and use it as you would use the ONNX Runtime.

import { InferenceSession } from "isomorphic-onnxruntime"; // instead of "onnxruntime-web" or "onnxruntime-node"

// All code is the same as with original libraries

Check installation

When in doubt you can always check loaded environment by importing environment from isomorphic-onnxruntime and checking it's value:

import { environment } from "isomorphic-onnxruntime";
console.log(environment); // "web" or "node"

License

MIT

FAQs

Package last updated on 03 Jan 2024

Did you know?

Socket

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.

Install

Related posts

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