open-index/open-npm huggingface dataset:
npm package: @stoplight/ordered-object-literal
Description: Object literal maintaining its properties in the order they were added
Author: Stoplight
Latest version: 1.0.5

# @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)
npm package: @stoplight/path
Description: <!-- BADGES -->
Author: Stoplight
Latest version: 2.0.1

# @stoplight/path

<!-- BADGES -->

<!-- SUMMARY -->

- View the changelog: [Releases](https://github.com/stoplightio/path/releases)

### Features

- **Awesome**: It is.
- .. more features

### Installation

Supported in modern browsers and node.

```bash
# latest stable
yarn add @stoplight/path
```

### Usage

```ts
import * as path from '@stoplight/path';

// ...example
```

### Contributing

1. Clone repo.
2. Create / checkout `feature/{name}`, `chore/{name}`, or `fix/{name}` branch.
3. Install deps: `yarn`.
4. Make your changes.
5. Run tests: `yarn test.prod`.
6. Stage relevant files to git.
7. Commit: `yarn commit`. _NOTE: Commits that don't follow the [conventional](https://github.com/marionebl/commitlint/tree/master/%40commitlint/config-conventional) format will be rejected. `yarn commit` creates this format for you, or you can put it together manually and then do a regular `git commit`._
8. Push: `git push`.
9. Open PR targeting the `master` branch.
npm package: @stoplight/react-error-boundary
Description: <!-- BADGES -->
Author: Stoplight
Latest version: 3.0.0

# @stoplight/react-error-boundary

<!-- BADGES -->

<!-- SUMMARY -->

The React error boundary tailored to Stoplight needs, inspired by [react-error-boundary](https://github.com/bvaughn/react-error-boundary).

- Explore the components: [Storybook](https://stoplightio.github.io/react-error-boundary)
- View the changelog: [Releases](https://github.com/stoplightio/react-error-boundary/releases)

### Features

- all the great features provided by [react-error-boundary](https://github.com/bvaughn/react-error-boundary),
- built-in error reporting powered by Sentry,
- supports recovering,
- fallback component can try to recover error boundary.

### Installation

Supported in modern browsers and node.

```bash
# latest stable
yarn add @stoplight/react-error-boundary
```

### Usage

You can either make use of:

- withErrorBoundary HOC

```tsx
import { withErrorBoundary } from '@stoplight/react-error-boundary';

const SchemaViewer: React.FunctionComponent<{ schema: unknown }> = ({ schema }) => {
  if (typeof schema !== 'object' || schema === null) {
    throw new Error('Schema must be an object');
  }

  if (Object.keys(schema).length === 0) {
    throw new Error('Schema cannot be empty');
  }

  return <span>This is fine.</span>;
};

const MyWrappedComponent = withErrorBoundary(SchemaViewer, {
  recoverableProps: ['schema'],
});

const Page = () => (
  <div>
    <h1>Schema Viewer</h1>
    <MyWrappedComponent schema={{}} />
  </div>
);
```

- ErrorBoundary component

```tsx
import { ErrorBoundary } from '@stoplight/react-error-boundary';

const SchemaViewer: React.FunctionComponent<{ schema: unknown }> = ({ schema }) => {
  if (typeof schema !== 'object' || schema === null) {
    throw new Error('Schema must be an object');
  }

  if (Object.keys(schema).length === 0) {
    throw new Error('Schema cannot be empty');
  }

  return <span>This is fine.</span>;
};

const Page = () => (
  <div>
    <h1>Schema Viewer</h1>
    <ErrorBoundary>
      <SchemaViewer schema={{}} />
    </ErrorBoundary>
  </div>
);
```

### Contributing

1. Clone repo.
2. Create / checkout `feature/{name}`, `chore/{name}`, or `fix/{name}` branch.
3. Install deps: `yarn`.
4. Make your changes.
5. Run tests: `yarn test.prod`.
6. Stage relevant files to git.
7. Commit: `yarn commit`. _NOTE: Commits that don't follow the [conventional](https://github.com/marionebl/commitlint/tree/master/%40commitlint/config-conventional) format will be rejected. `yarn commit` creates this format for you, or you can put it together manually and then do a regular `git commit`._
8. Push: `git push`.
9. Open PR targeting the `master` branch.