jwtiny
v1.0.2
Published
Ultra tiny (649 bytes), cross-platform (browser/Node.js) and cross-module (CommonJS/ES2015/AMD) JWT utils: body parser and isExpired method.
Downloads
329
Readme
jwtiny
Ultra tiny (649 bytes), cross-platform (browser/Node.js) and cross-module (CommonJS/ES2015/AMD) JWT utils: body parser and isExpired method.
Basic usage
- Install it using package manager
npm i -S jwtiny
- Import it using UMD (CommonJS, ES2015 modules or AMD)
import { parseJwt, isExpired } from 'jwtiny';
const jwtBody = parseJwt('a valid JWT');
// it will be undefined if JWT is not valid
const expired = isExpired(jwtBody);