@captchafox/node
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

@captchafox/node

NPM version

Installation

Install the library using your prefered package manager

npm install @captchafox/node
yarn add @captchafox/node
pnpm add @captchafox/node
bun add @captchafox/node

Usage

ESM / await

import { verify } from '@captchafox/node';

const secret = 'organization_secret';
const token = 'widget_token';

try {
  const data = await verify(secret, token);
  if (data.success) {
    console.log('success!', data);
  } else {
    console.log('verification failed');
  }
} catch (error) {
  console.log(error);
}

Require

const { verify } = require('@captchafox/node');

const secret = 'organization_secret';
const token = 'widget_token';

verify(secret, token)
  .then((data) => {
    if (data.success) {
      console.log('success!', data);
    } else {
      console.log('verification failed');
    }
  })
  .catch(console.error);

/@captchafox/node/

    Package Sidebar

    Install

    npm i @captchafox/node

    Weekly Downloads

    580

    Version

    1.2.0

    License

    MIT

    Unpacked Size

    8.47 kB

    Total Files

    6

    Last publish

    Collaborators

    • captchafox-npm
    • tgrassl