is-jwt

1.0.0 • Public • Published

is-jwt Build Status Coverage Status

Determine if a string is JSON Web Token (JWT)

Install

$ npm install --save is-jwt

Usage

const isJWT = require('is-jwt');
 
const VALID_JWT = 'eyJhbGciOiJIUzI1NiIsImV4cCI6MTQ5MzE3NDkxMCwiaWF0IjoxNDgyMzk3OTEwfQ.eyJyb2xlIjoiZW1wbG95ZXIiLCJpZCI6MiwiZW1haWwiOiJhc2hpa0BuZm5sYWJzLmluIn0.ICtMwjrhg4KbQjPJBWd29O4KRogNdjQj8bOhUrvYlLw';
 
isJWT(VALID_JWT);
//=> 'true'

API

isJwt(input, [options])

input

Type: string

A valid JWT token

License

MIT © Ashik Nesin

Readme

Keywords

none

Package Sidebar

Install

npm i is-jwt

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • ashiknesin