UNPKG

jwt-payload-decoder

Version:

A simple, exportable function for getting the payload from a JWT (JSON Web Token).

4 lines (3 loc) 91 B
exports.getPayload = function(token) { return JSON.parse(atob(token.split('.')[1])) };