Makes Base64 en & -decoding simpler as it is.

Overview

jQuery.base64.js

(feel free to write a bit about it)

You can check for btoa and atob support and refer to jQuery.base64

if (!window.btoa) window.btoa = $.base64.btoa
if (!window.atob) window.atob = $.base64.atob

Options

You can define some options per default, set them globally use the following syntax:

$.base64.utf8encode = true;

Utf8 encoding and decoding as global option, possibilities:

option description default
raw If false it encodes/decodes both, the input and output. true
utf8encode To encode only the input you can set encodung to true. false
utf8decode Same as above but for the output and decoding. false

You can override the global options by passing an extra parameter:

$.base64[property](<value>, options); / $.base64(<property>, <value>, options);

To enable UTF8-encoding pass true as the last paramter:

$.base64.atob(<value>, true);
$.base64('atob', <value>, true);

Download

Get the raw script, download the complete package or fork it on GitHub.

Support

@yckart #jquery #base64 http://yckart.com

Thanks

###License Copyright (c) 2013 Yannick Albert (http://yckart.com/)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

You might also like...

CA9.io Portal Seed Server. Makes sure the project files are always accessable.

Torrent Seed Server What is this about? This project helps users of CA9.io Metaverse to keep their files and addons permanently available. Since we us

Feb 3, 2022

Brew-Near-You - An app that makes it easy to find a brewery near you

Brew-Near-You - An app that makes it easy to find a brewery near you

Brew Near You An app that makes it easy to find a brewery near you Built With HT

Aug 3, 2022

An extension that makes Scratching much easier!

ScratchTools An extension that makes Scratching much easier! Official Discord. v1.0 ScratchTools Version 1.0 had multiple bugs, making it impossible t

May 23, 2022

This is a library that makes it possible to change the configuration values of the Remix compiler (esbuild).

💽 remix-esbuild-override ⚠️ While I believe you will most likely get a lot of benefit from using this library, it can sometimes destroy your product.

Dec 22, 2022

🖼️ Image proxy for Next.js. Makes it possible to use dynamic domains in next/image component.

Next.js Image Proxy Image proxy for Next.js. Makes it possible to use dynamic domains in next/image component. ❔ Motivation This library makes it poss

Dec 1, 2022

Node js package makes creating node jd dependincies files like Controllers,Entities and Repositories easier by executing a few instructions

Node js package makes creating node jd dependincies files like Controllers,Entities and Repositories easier by executing a few instructions

Nodejs Studio Node js package makes creating node js project dependincies files like Controllers,Entities and Repositories easier by executing a few i

Oct 12, 2022

⚡️ Makes writing scripts absurdly easy

haxx easily create and run scripts using javascript getting started • commands • api Features 🔀 Process DX - easily manage and run processes 📦 Javas

Apr 15, 2022

Inferrd makes Machine Learning deployment easy and scalable.

Inferrd makes Machine Learning deployment easy and scalable.

Introduction ML Deployment made simple, scalable and collaborative The new open-source standard to deploy, monitor and secure Machine Learning service

Dec 16, 2022

A program that makes scripting videos easier.

QuickScript A program that makes scripting videos easier. Scripts can be written using only the keyboard. Installation Clone/fork the repository Insta

Jun 22, 2022
Comments
  • > symbol falls off

    > symbol falls off

    When trying to use $.base64.encode to keep code from breaking.

    I need to store in my database "Name"

    issue: earlier version i had dropped the > off the end if i had 1,4,7,10 characters between brackets

    this version is still dropping on <0123456789>

    I grab id and $.base64.encode( $(this).val() ) &...next...

    update: it encodes correctly and works correctly except I have noticed that the + falls off the end via ajax, which losses the > bracket. Still investigating.

    Thanks in Advance

    bug 
    opened by calql8tor 0
  • 4byte UTF-8 character decoding

    4byte UTF-8 character decoding

    Hi,

    unfortunatly UTF 8 mb-characters with 4 bytes don't seem to work with this library.

    8J+Sow==
    

    should be decoded to a bomb-emoji (💣), but instead gets translated into garbled data.

    2byte emojis like 4piU work fine. ->☔

    Any ideas?

    Thanks, Tobias

    opened by Manawyrm 0
Owner
Yannick Albert
Nocturnal breakfast hero
Yannick Albert
Fast & minimal implementation of bech32, base64, base32, base16 & base58

micro-base Fast and minimal implementation of bech32, base64, base58, base32 & base16. Matches following specs: Bech32, Bech32m: BIP173, BIP350 Base16

Paul Miller 45 Jan 4, 2023
base64 decoder and encoder for nextjs 🎉

next-base64 next-base64 is a library for client-side and server-side base64 encoding and decoding Installation # Using npm npm install --save next-bas

Yony Calsin 5 Sep 11, 2022
An even simpler wrapper around native Fetch to strip boilerplate from your fetching code!

Super lightweight (~450 bytes) wrapper to simplify native fetch calls using any HTTP method (existing or imagined). Features Fully typed/TypeScript su

Kevin R. Whitley 49 Dec 28, 2022
A Browser extension that not only makes your browsing experience safe but makes it optimized

Sia Sia is a browser extension that not only makes your browsing experience safe but makes it optimized Table of Contents About The Project Built With

Arun Govind M 14 Feb 23, 2022
A JavaScript module that shortens your code, makes life easier, and makes development faster!

Quxt A JavaScript module that shortens your code, makes life easier, and makes development faster! Installation npm install quxt Quick Start Check ind

Qux App 5 May 8, 2022
A collection of preloaded and essential files that makes the website more attractive, smooth and user friendly

Web-Docs A collection of preloaded and essential files that makes the website more attractive, smooth and user friendly How to use: git clone https://

MAINAK CHAUDHURI 23 Dec 17, 2022
Jaxit is an easy-to-use library that makes an interactive terminal for your programs.

Jaxit Jaxit is an easy-to-use library that makes an interactive terminal for your programs. Jaxit was made by Codeverse, so check on Codeverse's Profi

null 3 Dec 11, 2022
a lightweight, dependency-free JavaScript plugin which makes a HTML table interactive

JSTable The JSTable is a lightweight, dependency-free JavaScript plugin which makes a HTML table interactive. The plugin is similar to the jQuery data

null 63 Oct 20, 2022
InstantClick makes following links in your website instant.

InstantClick All the informations you need to use InstantClick are on the link above. This ReadMe’s purpose is about how to use and contribute to a de

Alexandre Dieulot 5.5k Jan 5, 2023
Programming language makes by hobby <3

Joule Programming language makes by hobby <3 About It's a compiled programming language written in JavaScript :/. Codes compile into Assembly code tha

null 6 Feb 17, 2022