# js-datastruct

> JS data structures

Latest version **1.0.2** (published 2021-12-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install js-datastruct
pnpm add js-datastruct
yarn add js-datastruct
bun add js-datastruct
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2021-12-19 |
| First published | 2021-12-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Ortyommm |
| Maintainers | meyl_on |

## Links

- npm: https://www.npmjs.com/package/js-datastruct
- Repository: https://github.com/Ortyommm/js-data-structures
- Homepage: https://github.com/Ortyommm/js-data-structures#readme
- Issues: https://github.com/Ortyommm/js-data-structures/issues
- npm.io page: https://npm.io/package/js-datastruct

## Recent versions

- 1.0.2 (latest) — 2021-12-19
- 1.0.1 — 2021-12-19
- 1.0.0 — 2021-12-19

## README

# Importing packages
`import {Tuple} from "js-datastruct"`
# Tuple
`const tuple = new Tuple(1, 2, 3)`

`tuple[0] = 2`

`console.log(tuple[0]) //-> 2`

`tuple[4] = 3; //-> RangeError: The last index of the tuple is 2`

`tuple[4]; //-> RangeError: The last index of the tuple is 2`

Tuple works with many array inbuilt methods, but not with push, pop, unshift, shift

`tuple.push(3) //-> TypeError: Invalid method. Tuple can't change its length`

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