# thrift-ds

> Thrift data structures

Latest version **1.1.1** (published 2019-09-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install thrift-ds
pnpm add thrift-ds
yarn add thrift-ds
bun add thrift-ds
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2019-09-02 |
| First published | 2019-08-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 25.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Rastopyr |
| Maintainers | rastopyr |

## Links

- npm: https://www.npmjs.com/package/thrift-ds
- Repository: https://github.com/Rastopyr/thrift-ds
- Homepage: https://github.com/Rastopyr/thrift-ds#readme
- Issues: https://github.com/Rastopyr/thrift-ds/issues
- npm.io page: https://npm.io/package/thrift-ds

## Dependencies (3)

- [thrift-ds](https://npm.io/package/thrift-ds.md) 1.1.0
- [big-integer](https://npm.io/package/big-integer.md) ^1.6.44
- [@creditkarma/thrift-parser](https://npm.io/package/@creditkarma/thrift-parser.md) ^1.2.0

## Recent versions

- 1.1.1 (latest) — 2019-09-02
- 1.1.0 — 2019-08-30
- 1.0.2 — 2019-08-28
- 1.0.1 — 2019-08-27
- 1.0.0 — 2019-08-27

## README

# Thrift data structures

## How it works

This is library provide simple api to work with Thrift data structures from
thrift definition.

```js
import Thrift from "thrift";

const thriftStr = `
struct Example {
    1:  string                stringProperty,
    2:  noolean               booleanProperty,
    3:  i64                   i64Property
}

struct NextExample {
    1:  string                anotherStringProperty,
    2:  Example               exampleRef
}
`;

const thrift = Thrift(thriftStr);

const example = thrift.Example();
const nextExample = thrift.NextExample();

example.stringProperty = "someString value";
example.booleanProperty = false;

nextExample.anotherStringProperty = "someAnotherString";
nextExample.exampleRef = example;

// will output buffer
console.log(nextExample.toString());

// will output buffer
console.log(nextExample.toString());
```

---
_Source: https://npm.io/package/thrift-ds · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
