Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

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

advanced-rest-client2.7kApache-2.03.2.0TypeScript support: included

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

web-components, headers-parser, api-components, arc-components

readme

Published on NPM

Build Status

Published on webcomponents.org

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

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

In a LitElement

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

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

Running the demo locally

npm start

Running the tests

npm test

changelog

2.0.3 (2018-12-17)

Fix

New

Update

2.0.2 (2018-05-21)

Fix

New

Update

2.0.1 (2018-03-13)

Fix

New

Update

0.1.4 (2017-10-01)

Fix

New

Update

0.1.3 (2017-06-20)

Fix

New

Update

0.1.1 (2016-12-07)

3.0.1 (2020-03-01)

Build

  • bumping version 3bcbe59 by Pawel Psztyc

Continuous integration

  • updating travis configuration 20b6b8c by Pawel Psztyc

Update

  • removing namespace from types 1e3e191 by Pawel Psztyc
  • upgrading dependencies 1396b02 by Pawel Psztyc
  • upgrading dependencies to fix audit errors 64ecfa2 by Pawel Psztyc

Refactor

  • upgrading component to latest ARC standards 4aaa4c1 by Pawel

Testing

  • updating tests configuration 8c1031b by Pawel Psztyc

Other

  • Update: Updating import path to match web spec 378f134 by Pawel Psztyc
  • Update: Updating tests configuration 0a19690 by Pawel Psztyc
  • New: Adding npm ignore file 0ec0ac2 by Pawel Psztyc
  • Update: Updating import paths 772e615 by Pawel
  • Update: Updated Travis configuration to connect to Sauce Labs. 7570bc5 by Pawel

3.1.0 (2020-04-15)

Build

  • bumping version 68d009a by Pawel
  • bumping version 3bcbe59 by Pawel Psztyc

Continuous integration

  • updating travis configuration 20b6b8c by Pawel Psztyc

Update

  • adding tests for plain object bc75053 by Pawel
  • updating types 4d81e72 by Pawel
  • removing unused metadata 5ba2436 by Pawel
  • removing Polymer dependency fb922fa by Pawel
  • upgrading dependencies 3a3ad66 by Pawel
  • [ci skip] automated merge master->stage. syncing main branches 22729a9 by Ci agent
  • removing namespace from types 1e3e191 by Pawel Psztyc
  • upgrading dependencies 1396b02 by Pawel Psztyc
  • upgrading dependencies to fix audit errors 64ecfa2 by Pawel Psztyc

Refactor

  • moving sources to the src/ folder 1a62547 by Pawel

Testing

  • updating tests configuration 8c1031b by Pawel Psztyc

3.2.0 (2020-05-08)

Build

Update

  • [ci skip] automated merge master->stage. syncing main branches 83cc6c2 by Ci agent
  • adding tests for plain object bc75053 by Pawel
  • updating types 4d81e72 by Pawel
  • removing unused metadata 5ba2436 by Pawel
  • removing Polymer dependency fb922fa by Pawel
  • upgrading dependencies 3a3ad66 by Pawel
  • [ci skip] automated merge master->stage. syncing main branches 22729a9 by Ci agent

Refactor

  • moving mixin to a module implementation 1e76564 by Pawel
  • moving sources to the src/ folder 1a62547 by Pawel