Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jwt-decode

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jwt-decode - npm Package Compare versions

Comparing version 1.1.2 to 1.2.0

8

lib/index.js

@@ -0,1 +1,3 @@

'use strict';
var base64_url_decode = require('./base64_url_decode');

@@ -5,3 +7,7 @@ var json_parse = require('./json_parse');

module.exports = function (token) {
if (!token) {
throw new Error('Invalid token specified');
}
return json_parse(base64_url_decode(token.split('.')[1]));
};
};

2

package.json
{
"name": "jwt-decode",
"version": "1.1.2",
"version": "1.2.0",
"description": "Decode JWT tokens, mostly useful for browser applications.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -26,2 +26,4 @@ __jwt-decode__ is a small browser library that helps decoding JWTs token which are Base64Url encoded.

**Note:** A falsy token will throw an error.
## Develop

@@ -28,0 +30,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc