# tknverif

> Verifies token

Latest version **1.1.4** (published 2019-10-24) · ISC license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install tknverif
pnpm add tknverif
yarn add tknverif
bun add tknverif
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.1.4 |
| Published | 2019-10-24 |
| First published | 2019-10-24 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 5.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | informathemusic |
| Maintainers | informathemusic |

## Links

- npm: https://www.npmjs.com/package/tknverif
- Repository: https://github.com/informathemusic/tknverif
- Homepage: https://github.com/informathemusic/tknverif#readme
- Issues: https://github.com/informathemusic/tknverif/issues
- npm.io page: https://npm.io/package/tknverif

## Dependencies (2)

- [events](https://npm.io/package/events.md) ^3.0.0
- [discord.js](https://npm.io/package/discord.js.md) ^11.5.1

## Recent versions

- 1.1.4 (latest) — 2019-10-24
- 1.1.3 — 2019-10-24
- 1.1.2 — 2019-10-24
- 1.1.1 — 2019-10-24
- 1.1.0 — 2019-10-24
- 1.0.0 — 2019-10-24

## README

# TknVerif

Please do not use this module in a malicious context.

## How to install:

`npm i tknverif`

## Features

Generate discord tokens

Check discord tokens

## Check

### How to use:

`check(tokens, [simultanous, [onerror, [onsuccess]]])`

Returns `Array<Map<string token,boolean valid>>`

#### tokens

Tokens to check

This is an array

#### simultanous

Number of invocations,defaulting to`1`.

More is faster!

Set to default if it is bigger than `tokens.length`

#### onerror

Function to execute on error,defaulting to an empty function.

Called with options: `token,index,invocationNumber,error`

#### onsuccess

Function to execute on success,defaulting ot an empty function.

Called with options: `token,index,invocationNumber,client`

### Examples

```js
let tknVerif=require('tknverif')
let fs=require('fs')
let tokens=fs.readFileSync('tokens.csv','utf8').split(',')
tknVerif.check(tokens,3,(token)=>{console.log("token \""+token+"\" is invalid")},(token)=>{console.log("token \""+token+"\" is valid")})
```

## Gen

### How to use

`gen(quantity)`

Returns `Array(string)`

#### quantity

Quantity of tokens to generate

### Examples

```js
let tknVerif=require('tknverif')
tknVerif.gen(20)
	.then(tokens=>{console.log(tokens)})
```

## GenCheck

### How to use

`genCheck(quantity, [simultanous, [onerror, [onsuccess]]])`

Returns `Array<Map<string token,boolean valid>>`

#### quantity

Quantity of tokens to generate

#### simultanous

Number of invocations,defaulting to`1`.

More is faster!

Set to default if it is bigger than `quantity`

#### onerror
Function to execute on error,defaulting to an empty function.

Called with options: `token,index,invocationNumber,error`

#### onsuccess
Function to execute on success,defaulting ot an empty function.

Called with options: `token,index,invocationNumber,client`

### Examples

```js
let tknVerif=require('tknverif')
tknVerif.genCheck(20,3,(token)=>{console.log("token \""+token+"\" is invalid")},(token)=>{console.log("token \""+token+"\" is valid")})
```

---
_Source: https://npm.io/package/tknverif · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
