@stoplight/ordered-object-literal
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

@stoplight/ordered-object-literal

Install

Do not use it if you can use maps.

yarn add @stoplight/ordered-object-literal

or if npm is package manager of your choice

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

Usage

I want to create a new object

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

const trackedObj = box({});

I have an existing object

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.5
    361,550
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.5
    361,550
  • 1.0.4
    194,036
  • 1.0.3
    5,374
  • 1.0.2
    19,766
  • 1.0.1
    1,514
  • 1.0.0
    0

Package Sidebar

Install

npm i @stoplight/ordered-object-literal

Weekly Downloads

582,240

Version

1.0.5

License

Apache-2.0

Unpacked Size

30.8 kB

Total Files

7

Last publish

Collaborators

  • stoplight-devops