Detalhes do pacote

urlsafer

towyuan10MIT0.1.1

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

base64, url-safe, url, safe

readme (leia-me)

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