Socket
Book a DemoInstallSign in
Socket

@eternaljs/captcha

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eternaljs/captcha

This npm package generates secure and customizable CAPTCHA images for web applications, preventing automated abuse with ease.

0.1.0
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

Captcha

The "captcha" npm package provides a straightforward solution for generating secure and customizable CAPTCHA (Completely Automated Public Turing test to tell Computers and Humans Apart) images for use in web applications. CAPTCHAs are widely employed to prevent automated abuse, such as spamming or unauthorized access, by verifying that the user is a human rather than a bot.

Installing

Using npm:

$ npm install @eternaljs/captcha

Using yarn:

$ yarn add @eternaljs/captcha

Imports

These examples assume you're in node, or something similar:

// JavaScript
const generateCaptcha = require("@eternaljs/captcha");

// TypeScript
import * as generateCaptcha from "@eternaljs/captcha";

Usage Example

const captcha = generateCaptcha({ width: 180, height: 50 })
console.log(captcha.text); // Outputs a random alphanumeric code of the specified length
console.log(captcha.image.toBuffer()); // Returns an Image Buffer
console.log(captcha.image.toDataURL()); // Returns an Image base64 data url 

License

MIT

Keywords

captcha

FAQs

Package last updated on 29 Mar 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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.