open-index/open-npm huggingface dataset:
npm package: @stopism/shortreddit
Description: The Reddit Url Shortner thats simple.
Author: NotMoni
Latest version: 2.0.0

# @stopism/shortreddit

![npm bundle size](https://img.shields.io/bundlephobia/min/@stopism/shortreddit)

A Reddit URL Shortener that's simple to use.

## Install

```
$ npm install @stopism/shortreddit
```

## Usage

```js
const reddit = require("@stopism/shortreddit");

reddit("https://www.reddit.com/r/javascript/comments/6hz7o6/pass_by_reference_pass_by_value/");
//=> "https://redd.it/6hz7o6"

reddit(1337);
//=> Uncaught TypeError: reddit wants a string!
//    at reddit (<anonymous>:2:39)
//    at <anonymous>:11:1
```
npm package: @stoplight/better-ajv-errors
Description: JSON Schema validation for Human
Author: Rifat Nabi
Latest version: 1.0.3

> JSON Schema validation for Human 👨‍🎤

Main goal of this library is to provide relevant AJV error messages. It's a fork
of great [better-ajv-errors](https://github.com/atlassian/better-ajv-errors) by
Atlassian, with focus on being leaner.

## Installation

```bash
$ yarn add @stoplight/better-ajv-errors
```

or

```bash
$ npm i @stoplight/better-ajv-errors
```

Also make sure that you installed [ajv](https://www.npmjs.com/package/ajv)
package to validate data against JSON schemas.

## Usage

First, you need to validate your payload with `ajv`. If it's invalid then you
can pass `validate.errors` object into `better-ajv-errors`.

```js
import Ajv from 'ajv';
import betterAjvErrors from '@stoplight/better-ajv-errors';
// const Ajv = require('ajv');
// const betterAjvErrors = require('better-ajv-errors');

// You need to pass `jsonPointers: true`
const ajv = new Ajv({ jsonPointers: true });

// Load schema and data
const schema = ...;
const data = ...;

const validate = ajv.compile(schema);
const valid = validate(data);

if (!valid) {
  const output = betterAjvErrors(schema, validate.errors, {
    propertyPath: [],
    targetValue: data,
  });
  console.log(output);
}
```

## API

### betterAjvErrors(schema, data, errors, [options])

Returns formatted validation error to **print** in `console`. See
[`options.format`](#format) for further details.

#### schema

Type: `Object`

The JSON Schema you used for validation with `ajv`.

#### errors

Type: `Array`

Array of
[ajv validation errors](https://github.com/epoberezkin/ajv#validation-errors)

#### options

Type: `Object`

##### propertyPath

Type: `Array`

Property path of a validated object that is a part of a bigger document. Might
be empty if the validated object equals the whole document.

##### targetValue

Type: `Object`

The JSON payload you validate against using `ajv`.
npm package: @stoplight/cra-template-elements-dev-portal
Description: Elements Dev Portal Creat React App Template
Latest version: 1.0.0

# Elements Dev Portal Create React App Template

This is a Create React App Template for [Stoplight Elements Dev Portal](https://github.com/stoplightio/elements);

To use it, simply type `npx create-react-app my-dir --template @stoplight/elements-dev-portal`.
npm package: @stoplight/elements-web-components
Description: [Web Components](https://developer.mozilla.org/en-US/docs/Web/Web_Components) build of the [@stoplight/elements](https://www.npmjs.com/package/@stoplight/elements) library.
Author: Stoplight
Latest version: 6.4.1

# @stoplight/elements-web-components

[Web Components](https://developer.mozilla.org/en-US/docs/Web/Web_Components) build of the [@stoplight/elements](https://www.npmjs.com/package/@stoplight/elements) library. 

Elements is a collection of UI components for displaying beautiful developer documentation using an OpenAPI document or a Stoplight project.

## Documentation

For full documentation, visit [https://meta.stoplight.io/docs/elements](https://meta.stoplight.io/docs/elements).

## Examples

- [Angular Starter](https://github.com/stoplightio/elements-starter-angular)

## About

Elements is developed and maintained by [Stoplight](https://stoplight.io).

## License

Licensed under the Apache License, Copyright © 2020-present Stoplight.

See [LICENSE](LICENSE.md) for more information.