# @stoplight/ordered-object-literal

> Object literal maintaining its properties in the order they were added

Latest version **1.0.5** (published 2023-11-28) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @stoplight/ordered-object-literal
pnpm add @stoplight/ordered-object-literal
yarn add @stoplight/ordered-object-literal
bun add @stoplight/ordered-object-literal
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2023-11-28 |
| First published | 2020-04-16 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=8 |
| Dependencies | 0 |
| Unpacked size | 30.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Stoplight |
| Maintainers | stoplight-devops |
| Keywords | object, object-literal, iteration |

## Links

- npm: https://www.npmjs.com/package/@stoplight/ordered-object-literal
- Repository: https://github.com/stoplightio/ordered-object-literal
- Issues: https://github.com/stoplightio/ordered-object-literal/issues
- npm.io page: https://npm.io/package/@stoplight/ordered-object-literal

## Recent versions

- 1.0.5 (latest) — 2023-11-28
- 1.0.4 — 2022-08-30
- 1.0.3 — 2022-06-06
- 1.0.2 — 2021-04-28
- 1.0.1 — 2020-04-20
- 1.0.0 — 2020-04-16

## README

# @stoplight/ordered-object-literal

## Install

Do not use it if you can use maps.

```sh
yarn add @stoplight/ordered-object-literal
```

or if npm is package manager of your choice

```sh
npm install @stoplight/ordered-object-literal --save
```

## Usage

### I want to create a new object

```js
import box from '@stoplight/ordered-object-literal';

const trackedObj = box({});
```

### I have an existing object

```js
import box from '@stoplight/ordered-object-literal';

const myObj = { 
  a: true,
  b: void 0,
};

const trackedObj = box(myObj);
// alternatively if you want to provide a custom orer
const trackedReversedObj = box(myObj, ['b', 'a']);
```

## LICENSE

[Apache License 2.0](https://github.com/stoplightio/ordered-object-literal/blob/master/LICENSE)

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