Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dmmulroy/s-tier
S-tier S-Expression serialization & deserialization for JavaScript powered by OCaml 🐫✨
https://github.com/dmmulroy/s-tier
javascript ocaml reasonml s-tier sexp typescript
Last synced: 9 days ago
JSON representation
S-tier S-Expression serialization & deserialization for JavaScript powered by OCaml 🐫✨
- Host: GitHub
- URL: https://github.com/dmmulroy/s-tier
- Owner: dmmulroy
- Created: 2024-01-11T15:00:56.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-02-13T13:11:24.000Z (9 months ago)
- Last Synced: 2024-04-20T00:55:00.446Z (7 months ago)
- Topics: javascript, ocaml, reasonml, s-tier, sexp, typescript
- Language: OCaml
- Homepage:
- Size: 146 KB
- Stars: 8
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
The s-tier npm library for s-expression serialization and deserialization.
Start using S-Tier today withnpm install s-tier
About S-Tier
S-Tier is a library in the npm ecosystem for efficient and extensive serialization and deserialization of s-expressions. It's unique in offering both standard and canonical s-expression (de)serialization, making it an indispensable tool for developers working with these formats.
At its heart, S-Tier leverages the power of [sexplib](https://github.com/janestreet/sexplib) and [csexp](https://github.com/ocaml-dune/csexp), two renowned libraries from the OCaml ecosystem, compiled into JavaScript using [Melange](https://melange.re). This synergy brings unparalleled speed and reliability to JavaScript and TypeScript developers.
Features
S-Tier offers:- 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.Usage Examples
```typescript
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))
*/
```