Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
[![npm version](https://img.shields.io/npm/v/deepai.svg?style=flat-square)](https://www.npmjs.org/package/deepai)
Simple Javascript Client Library for Deep AI's APIs from Browser and Node.js
Node.js or other environments using npm:
npm install --save deepai
Browser:
<script src="https://cdnjs.deepai.org/deepai.min.js"></script>
Most examples are for Content Moderation, but you can subsitute any model name available at DeepAI.
Ensure that you pass the correct input names. Not all model input names are "image". You can find the correct input name on the page for each model at DeepAI.org
All examples use Async-Await syntax, so ensure you run the code in an async function.
// Ensure you load deepai with one of the methods in "Installation"
deepai.setApiKey('YOUR_API_KEY'); // get your free API key at https://deepai.org
Pass URL:
var result = await deepai.callStandardApi("content-moderation", {
image: "https://YOUR_IMAGE_URL"
});
Pass Literal Text:
var result = await deepai.callStandardApi("sentiment-analysis", {
text: "I am very happy to play with the newest APIs!"
});
Pass Image DOM Element:
var result = await deepai.callStandardApi("content-moderation", {
image: document.getElementById('yourImageId')
});
Pass File Picker Element:
var result = await deepai.callStandardApi("content-moderation", {
image: document.getElementById('yourFilePickerId')
});
This code will render the result of the API call into an existing HTML element, such as a div, with the id "yourResultContainerId".
The result will fit itself inside your container, so be sure to set a size on it.
var result = await deepai.callStandardApi("content-moderation", {
image: "https://YOUR_IMAGE_URL"
});
await deepai.renderResultIntoElement(result, document.getElementById('yourResultContainerId'));
const deepai = require('deepai');
deepai.setApiKey('YOUR_API_KEY'); // get your free API key at https://deepai.org
Pass URL:
var result = await deepai.callStandardApi("content-moderation", {
image: "https://YOUR_IMAGE_URL"
});
Pass Literal Text:
var result = await deepai.callStandardApi("sentiment-analysis", {
text: "I am very happy to play with the newest APIs!"
});
Pass File Upload:
const fs = require('fs');
<...>
var result = await deepai.callStandardApi("content-moderation", {
image: fs.createReadStream('/path/to/your/file.jpg')
});
npm install
npm run-script build
FAQs
[![npm version](https://img.shields.io/npm/v/deepai.svg?style=flat-square)](https://www.npmjs.org/package/deepai) [![CodeQL](https://github.com/deepai-org/deepai-js-client/actions/workflows/codeql.yml/badge.svg)](https://github.com/deepai-org/deepai-js-cl
The npm package deepai receives a total of 2,185 weekly downloads. As such, deepai popularity was classified as popular.
We found that deepai demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.