Socket
Book a DemoInstallSign in
Socket

@flk/bas64

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@flk/bas64

A simple encoder and decoder for bas64 encodings.

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

Base64

A syntactic sugar wrapper to atob() and btoa().

This is a standalone package so it works on browser, node js or Falak framework.

Installation

flk install flk-base64

OR

npm install flk-base64

Usage

Node Js:

Import the package

import base64 from 'flk-base64';

OR

const base64 = require('flk-base64');

Browser

<script src="base64.js"></script>

Add the path of the file in the dist directory.

Encoding

// Encoding
let encodedString = base64.encode('hello world'); // SGVsbG8gd29ybGQ=

// Decoding
let decodedString = base64.decode('SGVsbG8gd29ybGQ='); // Hello world

Keywords

base64

FAQs

Package last updated on 17 Sep 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts