Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/uiur/fuzzysearch-highlight

Highlight fuzzy matched text
https://github.com/uiur/fuzzysearch-highlight

Last synced: 3 months ago
JSON representation

Highlight fuzzy matched text

Awesome Lists containing this project

README

        

# fuzzysearch-highlight
[![Build Status](https://travis-ci.org/uiureo/fuzzysearch-highlight.svg?branch=master)](https://travis-ci.org/uiureo/fuzzysearch-highlight)

Highlight fuzzy matched text with html.

This module is intended to be used with a module like [fuzzysearch](https://github.com/bevacqua/fuzzysearch).

```js
var highlight = require('fuzzysearch-highlight')

highlight('tqb', 'The quick brown fox')
//=> 'The quick brown fox'

highlight('quick', 'The quick brown fox', { tag: 'em' }),
//=> 'The quick brown fox'
```

## License
ISC