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

@frsource/base64

Package Overview
Dependencies
Maintainers
0
Versions
103
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@frsource/base64

base64 encoder/decoder with UTF-8 support 📔

  • 1.0.103
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

NPM version badge NPM total downloads badge semantic-relase badge license MIT badge

@frsource/base64

This javascript code is used to encode / decode data using base64 (this encoding is designed to make binary data survive transport through transport layers that are not 8-bit clean). Script is fully compatible with UTF-8 encoding. You can use base64 encoded data as simple encryption mechanism.

If you plan using UTF-8 encoding in your project don’t forget to set the page encoding to UTF-8 (Content-Type meta tag).

Installation

npm i @frsource/base64

Usage

// Importing:
// typescript / ES6
import { encode, decode } from '@frsource/base64';

// legacy javscript
const { encode, decode } = require('@frsource/base64');

const encoded = encode('我喜欢解码lubię dekodować');
console.log(encoded); // output: 5oiR5Zac5qyi6Kej56CBbHViacSZIGRla29kb3dhxIc=
const decoded = decode(encoded);
console.log(encoded); // output: 我喜欢解码lubię dekodować

References

Based on webtoolkit.info implementation. Original source code available at: http://www.webtoolkit.info/javascript_base64.html

License

MIT

Copyright (c) 2022-present, Jakub FRS Freisler, FRSOURCE

FRSOURCE logo

Keywords

FAQs

Package last updated on 09 Dec 2024

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

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