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

next-filter

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

next-filter

nsfwfilter with features like nsfw image detector, nsfw words detector, nsfw words cleaner

  • 2.0.0
  • unpublished
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
0
Weekly downloads
 
Created
Source

NextFilter

Nsfwfilter with features like nsfw image detector, nsfw words detector, nsfw words cleaner

Installation

Installation

npm i next-filter@latest

Usage Filter

const { filter, clean, detect } = require("next-filter"); // supports esm also.

// for nsfw image detection:
(async () => {
	const imageUrl = ``; // image url

	try {
		const resp = await filter(imageUrl);
		if (resp.result) {
			console.log("Image is nsfw");
		} else {
			console.log("Image isn't nsfw");
		}
	} catch (err) {
		console.log(err);
	}
})();

// for nsfw words cleaner:
(async () => {
	const prompt = ``; // your prompt

	try {
		const resp = await clean(prompt);
		console.log(resp.result);
	} catch (err) {
		console.log(err);
	}
})();

// for nsfw words detection:
(async () => {
	const prompt = ``; // your prompt

	try {
		const resp = await detect(prompt);
		if (resp.result) {
			console.log("Prompt contains nsfw words")
		} else {
			console.log("Prompt doesn't contain nsfw words")
		}
	} catch (err) {
		console.log(err);
	}
})();

General Notes For Image Filter

  • Animated GIF Support
  • Image Types: .jpg .png .bmp .gif .webp
  • Max image size: 10 MB

General Notes For Cleaner

  • Analyze text and return cleaned version of the text.
  • Language Support: Arabic, Czech, Danish, German, English, Esperanto, Spanish, Castilian, Persian, Finnish, French, Hindi, Hungarian, Italian, Japanese, Korean, Dutch, Flemish, Norwegian, Polish, Portuguese, Russian, Swedish, Thai, Klingon, Turkish, Chinese.

Support

  • if you face any problem the join our discord server.

Keywords

FAQs

Package last updated on 25 Jun 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