Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

fast-base64-length

LinusU14.3kMIT1.0.0TypeScript support: included

Get the byte length of a Base64 encoded string.

base64-length, base64, length

readme

Fast Base64 Length

Get the byte length of a Base64 encoded string.

Installation

npm install --save fast-base64-length

Usage

const base64Length = require('fast-base64-length')

// Pass the string to measure
console.log(base64Length('SGVsbG8sIFdvcmxkIQ=='))
//=> 13