open-index/open-npm huggingface dataset:
npm package: @stoplight/storybook-config
Description: Shared storybook config for UI-Kit based project
Author: Stoplight
Latest version: 2.0.6

# @stoplight/storybook-config

<!-- BADGES -->

A shared storybook config for [UI-Kit](https://github.com/stoplightio/ui-kit) based projects.

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

### Features

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

### Installation

Supported in modern browsers and node.

```bash
# latest stable
yarn add --dev @stoplight/storybook-config
```

### Usage

Please refer to UI-Kit repo for an actual usage.

### 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 `next` branch.
npm package: @stoplight/types
Description: Common typings for the Stoplight ecosystem.
Author: Stoplight
Latest version: 14.1.1

# @stoplight/types

Common typings for the Stoplight ecosystem.

- Explore the interfaces: [TSDoc](https://stoplightio.github.io/types/)
- View the changelog: [Releases](https://github.com/stoplightio/types/releases)

### Dependent repositories:

https://github.com/stoplightio/types/network/dependents

### Installation

Supported in modern browsers and node.

```bash
# latest stable
yarn add -D @stoplight/types
```

### 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 `next` branch.
npm package: @stoplight/yaml
Description: Useful functions when working with YAML.
Author: Stoplight
Latest version: 4.3.0

# @stoplight/yaml

[![Maintainability](https://api.codeclimate.com/v1/badges/5c6d61926d8f87b38b39/maintainability)](https://codeclimate.com/github/stoplightio/yaml/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/5c6d61926d8f87b38b39/test_coverage)](https://codeclimate.com/github/stoplightio/yaml/test_coverage)

Useful functions when working with YAML.

- Explore the interfaces: [TSDoc](https://stoplightio.github.io/yaml)
- View the changelog: [Releases](https://github.com/stoplightio/yaml/releases)

### Installation

Supported in modern browsers and node.

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

### Usage

- **[getJsonPathForPosition](./src/getJsonPathForPosition.ts)**: Computes JSON path for given position.
- **[getLocationForJsonPath](./src/getLocationForJsonPath.ts)**: Retrieves location of node matching given JSON path.
- **[parseWithPointers](./src/parseWithPointers.ts)**: Parses YAML into JSON and also returns diagnostics as well as full ast with line information.

```ts
// basic example of parseWithPointers
import { parseWithPointers } from "@stoplight/yaml";

const result = parseWithPointers("foo: bar");

console.log(result.data); // => the {foo: "bar"} JS object
```

```ts
// basic example of getJsonPathForPosition and getLocationForJsonPath
import { getJsonPathForPosition, getLocationForJsonPath, parseWithPointers } from "@stoplight/yaml";

const result = parseWithPointers(`hello: world
address:
    street: 123`
);

const path = getJsonPathForPosition(result, { line: 2, character: 7 }); // line and character are 0-based
console.log(path); // -> ["address", "street"];

const position = getLocationForJsonPath(result, ['address']);
console.log(position.range.start); // { line: 1, character: 8 } line and character are 0-based
console.log(position.range.end); // { line: 2, character: 15 } line and character are 0-based
```

### 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 `next` branch.
npm package: @stoplight/yaml-ast-parser
Description: [![Build Status](https://travis-ci.org/mulesoft-labs/yaml-ast-parser.svg?branch=master)](https://travis-ci.org/mulesoft-labs/yaml-ast-parser)
Latest version: 0.0.50

# yaml-ast-parser

[![Build Status](https://travis-ci.org/mulesoft-labs/yaml-ast-parser.svg?branch=master)](https://travis-ci.org/mulesoft-labs/yaml-ast-parser)

This is a fork of JS-YAML which supports parsing of YAML into AST.

In additional to parsing YAML to AST, it has following features:

* restoration after the errors and reporting errors as a part of AST nodes.
* built-in support for `!include` tag used in RAML

## Usage
The type information below is relevant when using TypeScript, if using from JavaScript only the field/method information is relevant.

`load` method can be used to load the tree and returns a `YAMLNode`.

### YAMLNode
`YAMLNode` class is an ancestor for all node kinds.
It's `kind` field determine node kind, one of `Kind` enum:
  * `SCALAR`, `MAPPING`, `MAP`, `SEQ`, `ANCHOR_REF` or `INCLUDE_REF`.
 
After node kind is determined, it can be cast to one of the `YAMLNode` descendants types:
 * `YAMLScalar`, `YAMLMapping`, `YamlMap`, `YAMLSequence` or `YAMLAnchorReference`.

| class | important members |
|-------|-------------------|
| `YAMLNode` | `startPosition` and `endPosition` provide node range.|
| `YAMLScalar` | `string` `value` field |
| `YAMLMapping` |`YAMLScalar` `key` and `YAMLNode` `value` fields | 
| `YAMLSequence` | `YAMLNode[]` `items` field|
| `YamlMap` | `YAMLMapping[]` `mappings` field|
| `YAMLAnchorReference` | `string` `referencesAnchor` and `YAMLNode` `value`|

### YAMLScalar

Scalars are [one of the three main node types defined by YAML](http://www.yaml.org/spec/1.2/spec.html#scalar//) and are effectively leaf nodes.

There are many factors that can influence the type of datum represent in scalar node (context, schema, tag, etc.).

To help inspection of a `YAMLScalar` to determine its datatype when a document uses the [Core Schema](http://www.yaml.org/spec/1.2/spec.html#id2804923), you can pass the `YAMLScalar` to the `determineScalarType` function.  It will return an enum value indicating `null`, `bool`, `int`, `float`, or `string`.

Once you know the type, there are also some helper functions to help read the value by passing them the string, `value`: `parseYamlBoolean`, `parseYamlFloat`, and `parseYamlInteger`.