0.1.1 • Published 5 months ago

urlsafer v0.1.1

Weekly downloads
-
License
MIT
Repository
-
Last release
5 months ago

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