Modules@robinpath/buffer
@robinpath/buffer
0.1.1PublicBuffer and encoding utilities: base64, base64url, hex, byte operations
@robinpath/buffer
Buffer and encoding utilities: base64, base64url, hex, byte operations
Why use this module?
The buffer module lets you:
- Create a base64 buffer from a string
- Convert a base64 buffer to string
- Create base64 from hex string
- Convert base64 to hex string
- Encode string to base64
All functions are callable directly from RobinPath scripts with a simple, consistent API.
Installation
npm install @robinpath/buffer
Quick Start
No credentials needed — start using it right away:
buffer.toString "aGVsbG8="
Available Functions
| Function | Description |
|---|---|
buffer.fromString | Create a base64 buffer from a string |
buffer.toString | Convert a base64 buffer to string |
buffer.fromHex | Create base64 from hex string |
buffer.toHex | Convert base64 to hex string |
buffer.toBase64 | Encode string to base64 |
buffer.fromBase64 | Decode base64 to string |
buffer.toBase64Url | Encode string to URL-safe base64 |
buffer.fromBase64Url | Decode URL-safe base64 to string |
buffer.byteLength | Get the byte length of a string |
buffer.concat | Concatenate multiple base64 buffers |
buffer.compare | Compare two base64 buffers |
buffer.isBase64 | Check if a string is valid base64 |
Examples
Convert a base64 buffer to string
buffer.toString "aGVsbG8="
Create base64 from hex string
buffer.fromHex "48656c6c6f"
Convert base64 to hex string
buffer.toHex "aGVsbG8="
Integration with RobinPath
import { RobinPath } from "@wiredwp/robinpath";
import Module from "@robinpath/buffer";
const rp = new RobinPath();
rp.registerModule(Module.name, Module.functions);
rp.registerModuleMeta(Module.name, Module.functionMetadata);
const result = await rp.executeScript(`
buffer.toString "aGVsbG8="
`);
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.1 | 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/buffer Version0.1.1
LicenseMIT
Unpacked Size3.9 KB
Versions1
Weekly Downloads0
Total Downloads0
Stars0
Last Publishyesterday
Createdyesterday

