Files
windmill/windmill-yaml-validator/node_modules/@stoplight/ordered-object-literal
2025-08-01 21:54:04 +00:00
..
all
2025-08-01 21:54:04 +00:00
all
2025-08-01 21:54:04 +00:00
all
2025-08-01 21:54:04 +00:00
all
2025-08-01 21:54:04 +00:00

@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