You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

base64url

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.5 to 1.0.6

12

index.js

@@ -14,3 +14,3 @@ function fromBase64(base64string) {

const b64str = padString(base64UrlString)
var b64str = padString(base64UrlString)
.replace(/\-/g, '+')

@@ -22,5 +22,5 @@ .replace(/_/g, '/');

function padString(string) {
const segmentLength = 4;
const stringLength = string.length;
const diff = string.length % segmentLength;
var segmentLength = 4;
var stringLength = string.length;
var diff = string.length % segmentLength;
if (!diff)

@@ -30,4 +30,4 @@ return string;

var padLength = segmentLength - diff;
const paddedStringLength = stringLength + padLength;
const buffer = Buffer(paddedStringLength);
var paddedStringLength = stringLength + padLength;
var buffer = Buffer(paddedStringLength);
buffer.write(string);

@@ -34,0 +34,0 @@ while (padLength--)

{
"name": "base64url",
"version": "1.0.5",
"version": "1.0.6",
"description": "For encoding to/from base64urls",

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

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc