is-jwt
Determine if a string is JSON Web Token (JWT)
Install
$ npm install --save is-jwt
Usage
const isJWT = ; const VALID_JWT = 'eyJhbGciOiJIUzI1NiIsImV4cCI6MTQ5MzE3NDkxMCwiaWF0IjoxNDgyMzk3OTEwfQ.eyJyb2xlIjoiZW1wbG95ZXIiLCJpZCI6MiwiZW1haWwiOiJhc2hpa0BuZm5sYWJzLmluIn0.ICtMwjrhg4KbQjPJBWd29O4KRogNdjQj8bOhUrvYlLw'; ;//=> 'true'
API
isJwt(input, [options])
input
Type: string
A valid JWT token
License
MIT © Ashik Nesin