Security News
Introducing the Socket Python SDK
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
react-native-quick-base64
Advanced tools
A native implementation of base64 in C++ for React Native
A native implementation of Base64 in C++ for React Native.
~16x faster than base64-js on an iPhone 15 Pro Max simulator. Try the benchmarks under example.
iPhone | Android |
---|---|
npm install react-native-quick-base64
import { btoa, atob } from 'react-native-quick-base64'
const base64 = btoa('foo')
const decoded = atob(base64)
Compatible with base64-js.
byteLength(b64: string): number
Takes a base64 string and returns length of byte array.
toByteArray(b64: string, removeLinebreaks: boolean = false): Uint8Array
Takes a base64 string and returns a byte array. Optional removeLinebreaks
removes all \n
characters.
fromByteArray(uint8: Uint8Array, urlSafe: boolean = false): string
Takes a byte array and returns a base64 string. Optional urlSafe
flag true
will use the URL-safe dictionary.
btoa(data: string): string
Encodes a string in base64.
atob(b64: string): string
Decodes a base64 encoded string.
shim()
Adds btoa
and atob
functions to global
.
trimBase64Padding = (str: string): string
Trims the =
padding character(s) off of the end of a base64 encoded string. Also, for base64url encoded strings, it will trim off the trailing .
character(s).
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT by Takuya Matsuyama
FAQs
A native implementation of base64 in C++ for React Native
We found that react-native-quick-base64 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.
Security News
A new Rust RFC proposes "Trusted Publishing" for Crates.io, introducing short-lived access tokens via OIDC to improve security and reduce risks associated with long-lived API tokens.