# @types/rison

> TypeScript definitions for rison

Latest version **0.1.0** (published 2024-10-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/rison
pnpm add @types/rison
yarn add @types/rison
bun add @types/rison
```

## Health

**Score 55/100 (C)** — status: stable.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support; pre 1.0.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2024-10-14 |
| First published | 2016-08-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51449 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/rison
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/rison
- npm.io page: https://npm.io/package/@types/rison

## Recent versions

- 0.1.0 (latest) — 2024-10-14
- 0.0.9 (ts4.5) — 2023-11-07
- 0.0.7 (ts3.6) — 2021-07-09
- 0.0.6 (ts3.1) — 2017-06-23
- 0.0.8 — 2023-10-18
- 0.0.5 — 2016-10-05
- 0.0.4 — 2016-09-19
- 0.0.3 — 2016-08-25
- 0.0.2 — 2016-08-19
- 0.0.1 — 2016-08-02

## README

# Installation
> `npm install --save @types/rison`

# Summary
This package contains type definitions for rison (https://github.com/Nanonid/rison).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/rison.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/rison/index.d.ts)
````ts
export = rison;
export as namespace rison;
declare const rison: IRison;

interface IRison {
    /**
     * Rison-encodes a javascript structure.
     * @param obj Object to encode.
     * @returns {} Encoded string.
     */
    encode(obj: any): string;

    /**
     * Rison-encodes a javascript object without surrounding parens (O-Rison).
     * @param obj Object to encode.
     * @returns {} Encoded string.
     */
    encode_object<T>(obj: T): string;

    /**
     * Rison-encodes a javascript array without surrounding parens (A-Rison).
     * @param obj Object to encode.
     * @returns {} Encoded string.
     */
    encode_array<T>(arr: T[]): string;

    /**
     * Rison-encodes and then url-escapes a javascript structure.
     * @param obj Object to encode.
     * @returns {} Encoded string.
     */
    encode_uri(obj: any): string;

    /**
     * Parses a Rison string into a javascript structure.
     * @param encoded Encoded string.
     * @returns {} Resulting array or object.
     */
    decode<T>(encoded: string): T;

    /**
     * Parses a O-Rison string into a javascript object.
     * @param encoded Encoded string.
     * @returns {} Resulting object.
     */
    decode_object<T>(encoded: string): T;

    /**
     * Parses a A-Rison string into a javascript array.
     * @param encoded Encoded string.
     * @returns {} Resulting array.
     */
    decode_array<T>(encoded: string): T[];
}

````

### Additional Details
 * Last updated: Mon, 14 Oct 2024 18:09:31 GMT
 * Dependencies: none

# Credits
These definitions were written by [Andrei Kurosh](https://github.com/impworks).

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