Modules@robinpath/encode

@robinpath/encode

0.1.0Public

Encoding and decoding conversions: Base64, Base32, hex, URL encoding, HTML entities, binary, ROT13, percent-encoding, and more

@robinpath/encode

Encoding and decoding conversions: Base64, Base32, hex, URL encoding, HTML entities, binary, ROT13, percent-encoding, and more

Category Functions Auth License

Why use this module?

The encode module lets you:

  • Encode a string or buffer to Base64
  • Decode a Base64-encoded string
  • Encode a string to URL-safe Base64 (no padding, +/ replaced with -_)
  • Decode a URL-safe Base64 string
  • Encode a string to hexadecimal representation

All functions are callable directly from RobinPath scripts with a simple, consistent API.

Installation

npm install @robinpath/encode

Quick Start

No credentials needed — start using it right away:

encode.base64Decode

Available Functions

FunctionDescription
encode.base64EncodeEncode a string or buffer to Base64
encode.base64DecodeDecode a Base64-encoded string
encode.base64UrlEncodeEncode a string to URL-safe Base64 (no padding, +/ replaced with -_)
encode.base64UrlDecodeDecode a URL-safe Base64 string
encode.hexEncodeEncode a string to hexadecimal representation
encode.hexDecodeDecode a hexadecimal string back to UTF-8
encode.base32EncodeEncode a string to Base32 (RFC 4648)
encode.base32DecodeDecode a Base32-encoded string
encode.urlEncodeEncode a string using encodeURIComponent
encode.urlDecodeDecode a URL-encoded string using decodeURIComponent
encode.htmlEncodeEncode HTML special characters into entities
encode.htmlDecodeDecode HTML entities back to characters
encode.utf8EncodeEncode a string to an array of UTF-8 byte values
encode.utf8DecodeDecode an array of UTF-8 byte values back to a string
encode.binaryEncodeEncode a string to its binary (0s and 1s) representation
encode.binaryDecodeDecode a binary (0s and 1s) string back to text
encode.asciiToCharConvert an ASCII code to its character
encode.charToAsciiConvert a character to its ASCII code
encode.rot13Apply ROT13 substitution cipher to a string
encode.percentEncodePercent-encode every byte of a string (e.g. 'A' becomes '%41')
encode.percentDecodeDecode a percent-encoded string

Examples

Decode a Base64-encoded string

encode.base64Decode

Encode a string to URL-safe Base64 (no padding, +/ replaced with -_)

encode.base64UrlEncode

Decode a URL-safe Base64 string

encode.base64UrlDecode

Integration with RobinPath

import { RobinPath } from "@wiredwp/robinpath";
import Module from "@robinpath/encode";

const rp = new RobinPath();
rp.registerModule(Module.name, Module.functions);
rp.registerModuleMeta(Module.name, Module.functionMetadata);

const result = await rp.executeScript(`
  encode.base64Decode
`);

Full API Reference

See MODULE.md for complete documentation including all parameters, return types, error handling, and advanced examples.

Related Modules

License

MIT

Versions (1)

VersionTagPublished
0.1.0latestyesterday
Install
$ robinpath install @robinpath/encode
Version0.1.0
LicenseMIT
Unpacked Size5.3 KB
Versions1
Weekly Downloads0
Total Downloads0
Stars0
Last Publishyesterday
Createdyesterday

Category

utilities