JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 11
  • Score
    100M100P100Q36447F
  • License MIT

A processor for processing ESI tags in html documents. Currently supporting esi:include, esi:remove, esi:comment, <!--esi -->, esi:choose and esi:vars.

Package Exports

  • esi-processor

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (esi-processor) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

esi-processor

node npm

A processor for processing ESI tags in html documents. Currently supporting esi:include, esi:remove, esi:comment, <!--esi -->, esi:choose and esi:vars.

Installation

npm install esi-processor

Usage

const esi = require('esi-processor').ESI;

const processed = await esi(html, [options]);

Options

You can use the following options:

BaseUrl

Add a base url to be used on relative esi:includes

Headers

Add custom HTTP headers for remote esi:includes e.g. { 'X-Custom-Header': 'x-custom-value' }

IgnoreEsiChooseTags

Ignore the esi:choose tags, only returning a comment

XmlMode

Use xmlMode (defaults to true). This option is passed to htmlparser2.

Verbose

Print extended log to the console.