# is-jwtoken

> Simple regex tester for jwtoken

Latest version **1.0.3** (published 2020-03-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install is-jwtoken
pnpm add is-jwtoken
yarn add is-jwtoken
bun add is-jwtoken
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2020-03-30 |
| First published | 2020-03-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 0 |
| Unpacked size | 2.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Basile Beldame |
| Maintainers | bbeldame |
| Keywords | token, isjwtoken, jwtoken, is, regex |

## Links

- npm: https://www.npmjs.com/package/is-jwtoken
- Repository: https://github.com/bbeldame/isJWToken
- Homepage: https://github.com/bbeldame/isJWToken#readme
- Issues: https://github.com/bbeldame/isJWToken/issues
- npm.io page: https://npm.io/package/is-jwtoken

## Alternatives

- [memory-cache](https://npm.io/package/memory-cache.md) — 795.0K weekly downloads
- [@httptoolkit/proxy-agent](https://npm.io/package/@httptoolkit/proxy-agent.md) — 11.2K weekly downloads
- [express-cache-controller](https://npm.io/package/express-cache-controller.md) — 5.3K weekly downloads
- [http-cache-middleware](https://npm.io/package/http-cache-middleware.md) — 4.5K weekly downloads
- [cache2](https://npm.io/package/cache2.md) — 1.5K weekly downloads

## Recent versions

- 1.0.3 (latest) — 2020-03-30
- 1.0.2 — 2020-03-29
- 1.0.1 — 2020-03-29
- 1.0.0 — 2020-03-29

## README

# is-jwtoken

> Simple regex tester for jwtoken

## Install

```
$ npm install is-jwtoken
```

## Usage

```js
const isJWToken = require('is-jwtoken');

isJWToken("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0Ijo0NjU0NjQ0NjU0NH0.JG9ys4Rr4CT3RKZwO3OIwYrWf3aY5Z4B9RKIE7j83n4");
// => true

isJWToken("eyJ0ZWFzZXIiOnRydWUsImRpYWxvZyI6ZmFsc2UsInNpZGViYXIiOm51bGwsInNpZGViYXJDb250YWluZXJTdHlsZSI6e319");
// => false

isJWToken("anything but a jwtoken"):
// => false
```

## Caution

To be used with the [jwtoken library](https://www.npmjs.com/package/jsonwebtoken) if you want to verify that the token is valid. This lib only test it via regex.

[Useful link](http://jwt.calebb.net/) for decoding JWToken from browser (using it for testing)

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