urlsafer
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

urlsafer

A JavaScript library for handling URL-safe Base64 encoding and decoding, offering full compatibility with modern standards and enhanced security.

Installation

Using npm:

npm install urlsafer

Using yarn:

yarn add urlsafer

Usage Example

const UrlSafer = require('urlsafer');

// Encoding
const encoded = UrlSafer.encode('Hello World');
console.log(encoded); // Outputs URL-safe Base64 encoded string

// Decoding
const decoded = UrlSafer.decode(encoded);
console.log(decoded); // Outputs the original string 'Hello World'

API

encode(rawString)

Encodes the given string into a URL-safe Base64 string.

decode(encodedString)

Decodes a URL-safe Base64 string back to the original string.

License

MIT

Package Sidebar

Install

npm i urlsafer

Weekly Downloads

2

Version

0.1.1

License

MIT

Unpacked Size

11.3 kB

Total Files

9

Last publish

Collaborators

  • towyuan