s-tier
v1.0.1
Published
S-tier S-Expression serialization & deserialization for JavaScript powered by OCaml 🐫✨
Downloads
53
Readme
At its heart, S-Tier leverages the power of sexplib and csexp, two renowned libraries from the OCaml ecosystem, compiled into JavaScript using Melange. This synergy brings unparalleled speed and reliability to JavaScript and TypeScript developers.
- Extensive s-expression serialization/deserialization: Handle complex s-expressions with ease.
- Canonical s-expression support: The only npm library offering this feature.
- High performance: Thanks to its OCaml roots and efficient Melange compilation.
- Ease of use: Designed with a straightforward API for quick integration into your projects.
const STier = require("s-tier");
// Example deserialization
let deserialized = STier.Canonical.deserialize(
"(10:methodName9:initalize(11:duneVersion4:3.13)(15:protocolVersion5:0.0.1))",
);
// Example serialization
let serialized = STier.serialize(deserialized);
/**
* (methodName initalize
* (duneVersion 3.13)
* (protocolVersion 0.0.1))
*/