# @advanced-rest-client/headers-parser-mixin

> Headers parser Polymer Mixin to be implemented to elements that needs to parse headers data

Latest version **3.2.0** (published 2020-05-08) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @advanced-rest-client/headers-parser-mixin
pnpm add @advanced-rest-client/headers-parser-mixin
yarn add @advanced-rest-client/headers-parser-mixin
bun add @advanced-rest-client/headers-parser-mixin
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.2.0 |
| Published | 2020-05-08 |
| First published | 2019-02-18 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 66.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | jarrodek, lbauret, twoplustwoone |
| Keywords | web-components, headers-parser, api-components, arc-components |

## Links

- npm: https://www.npmjs.com/package/@advanced-rest-client/headers-parser-mixin
- Repository: https://github.com/advanced-rest-client/headers-parser-mixin
- Homepage: https://github.com/advanced-rest-client/headers-parser-mixin#readme
- Issues: https://github.com/advanced-rest-client/headers-parser-mixin/issues
- npm.io page: https://npm.io/package/@advanced-rest-client/headers-parser-mixin

## Dependencies (1)

- [@open-wc/dedupe-mixin](https://npm.io/package/@open-wc/dedupe-mixin.md) ^1.2.17

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 3.2.0 (latest) — 2020-05-08
- 3.1.0 — 2020-04-15
- 3.0.1 — 2020-03-01
- 3.0.0 — 2019-07-24
- 3.0.0-preview.3 — 2019-04-02
- 3.0.0-preview.2 — 2019-02-19
- 3.0.0-preview.1 — 2019-02-18

## README

[![Published on NPM](https://img.shields.io/npm/v/@advanced-rest-client/headers-parser-mixin.svg)](https://www.npmjs.com/package/@advanced-rest-client/headers-parser-mixin)

[![Build Status](https://travis-ci.com/advanced-rest-client/headers-parser-mixin.svg)](https://travis-ci.com/advanced-rest-client/headers-parser-mixin)

[![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://www.webcomponents.org/element/advanced-rest-client/headers-parser-mixin)

## headers-parser-mixin

Headers parser mixin function to be implemented with elements that parses HTTP headers.

## Mixin deprecation notice

The mixing is being deprecated and implementation should move to use `HeadersParser` module instead.

## Usage

### Installation
```
npm install --save @advanced-rest-client/headers-parser-mixin
```

### As ES module

```js
import * as HeadersParser from '@advanced-rest-client/headers-parser-mixin';
const errorMessage = HeadersParser.getError('Whitespace Name: x-true');
```

### In a LitElement

```js
import { LitElement, html } from 'lit-element';
import { HeadersParserMixin } from '@advanced-rest-client/headers-parser-mixin';

class SampleElement extends HeadersParserMixin(LitElement) {
  render() {
    const validation = this.getHeaderError('Whitespace Name: x-true');
    return html`
    ${validation ? html`<p>${validation}<p>` : html`<p>Headers are valid</p>`}
    `;
  }
}
customElements.define('sample-element', SampleElement);
```

### Development

```sh
git clone https://github.com/advanced-rest-client/headers-parser-mixin
cd headers-parser-mixin
npm install
```

### Running the demo locally

```sh
npm start
```

### Running the tests

```sh
npm test
```

---
_Source: https://npm.io/package/@advanced-rest-client/headers-parser-mixin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
