Package Exports
- @rijk/jwt-payload
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@rijk/jwt-payload) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
jwt-payload
🔑 Get the JSON contents of a JWT payload
Installation
$ npm install @rijk/jwt-payloadUsage
const jwtPayload = require("@rijk/jwt-payload");
// OR
import jwtPayload from "@rijk/jwt-payload";
const jwt = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0eXBlIjoidG9rZW4iLCJpZCI6NCwiZXhwIjoxNTI2MDY1ODEyLCJ1cmwiOiJodHRwczovL3JpamtzLndlYnNpdGUifQ.ipzdIiYfYvGKeCJhTmtLzBsVnidtU8k_0VhPZ5bfwCw";
jwtPayload(jwt);
// =>
// {
// "type": "token",
// "id": 4,
// "exp": 1526065812,
// "url": "https://rijks.website"
// }License
MIT