Sign, verify and parse a JSON Web Token
$ npm i -S @tadashi/jwt
import {sign, verify, parse} from '@tadashi/jwt'
const jwt = await sign({name: 'Lucas Tadashi'})
// => eyJhbGciOiJIUz...
const {payload} = await verify(jwt)
// => {data: {name: 'Lucas Tadashi'}, jti: '6125968b0000000000f0b9f2', nbf: 1629853313}
const {
data: {name},
} = parse(jwt)
// => Lucas Tadashi
MIT © Thiago Lagden