UNPKG

bit-bin

Version:

<a href="https://opensource.org/licenses/Apache-2.0"><img alt="apache" src="https://img.shields.io/badge/License-Apache%202.0-blue.svg"></a> <a href="https://github.com/teambit/bit/blob/master/CONTRIBUTING.md"><img alt="prs" src="https://img.shields.io/b

20 lines (18 loc) 416 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = fromBase64; /** * decode a base64 string * @name fromBase64 * @param {string} base64 base64 string to decode * @returns {string} decoded string * @example * ```js * fromBase64('aGVsbG8gd29ybGQ=') // => 'hello world' * ``` */ function fromBase64(base64) { return Buffer.from(base64, 'base64').toString(); }