1.1.1 • Published 8 years ago

hi-lite v1.1.1

Weekly downloads
2
License
MIT
Repository
-
Last release
8 years ago

hi-lite

Server-side html highlighting

Getting Started

npm i hi-lite

Example

const highlight = require('hi-lite'),
  query = 'test',
  html = `<p>this is a test</p>`;

highlight(query, html);
//RETURNS
// <p>this is a <mark>test</mark></p>

API

highlight(query, html, options)

  • query: {String} - text to highlight in html content
  • html: {String} - HTML content.
  • options: {Object} - Parser and serializer options
  • parser: {Object} - see htmlparser2 options
  • serializer: {Object} - see dom-serializer
1.1.1

8 years ago

1.1.0

8 years ago

1.0.0

8 years ago