Modules@robinpath/encode
@robinpath/encode
0.1.0PublicEncoding 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
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
| Function | Description |
|---|---|
encode.base64Encode | Encode a string or buffer to Base64 |
encode.base64Decode | Decode a Base64-encoded string |
encode.base64UrlEncode | Encode a string to URL-safe Base64 (no padding, +/ replaced with -_) |
encode.base64UrlDecode | Decode a URL-safe Base64 string |
encode.hexEncode | Encode a string to hexadecimal representation |
encode.hexDecode | Decode a hexadecimal string back to UTF-8 |
encode.base32Encode | Encode a string to Base32 (RFC 4648) |
encode.base32Decode | Decode a Base32-encoded string |
encode.urlEncode | Encode a string using encodeURIComponent |
encode.urlDecode | Decode a URL-encoded string using decodeURIComponent |
encode.htmlEncode | Encode HTML special characters into entities |
encode.htmlDecode | Decode HTML entities back to characters |
encode.utf8Encode | Encode a string to an array of UTF-8 byte values |
encode.utf8Decode | Decode an array of UTF-8 byte values back to a string |
encode.binaryEncode | Encode a string to its binary (0s and 1s) representation |
encode.binaryDecode | Decode a binary (0s and 1s) string back to text |
encode.asciiToChar | Convert an ASCII code to its character |
encode.charToAscii | Convert a character to its ASCII code |
encode.rot13 | Apply ROT13 substitution cipher to a string |
encode.percentEncode | Percent-encode every byte of a string (e.g. 'A' becomes '%41') |
encode.percentDecode | Decode 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
@robinpath/json— JSON module for complementary functionality
License
MIT
Versions (1)
| Version | Tag | Published |
|---|---|---|
| 0.1.0 | latest | yesterday |
Related Modules
utilities
1
@dev-tester/hello-world
v2.0.0dev-tester
Updated description
0 downloads
...
utilities
0
@robinpath/apollo
v0.1.1robinpath
Apollo module for RobinPath.
0 downloads
...
utilities
0
@robinpath/archive
v0.1.1robinpath
Create and extract .zip and .tar.gz file archives
0 downloads
...
utilities
0
@robinpath/assert
v0.1.1robinpath
Testing assertions: equal, deepEqual, truthy, falsy, type checks, includes, matches, throws, and more
0 downloads
...
Install
$ robinpath install @robinpath/encode Version0.1.0
LicenseMIT
Unpacked Size5.3 KB
Versions1
Weekly Downloads0
Total Downloads0
Stars0
Last Publishyesterday
Createdyesterday

