Skip to content

wonderflow-bv/lighter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example

Highlight words in a HTML page with ease.

Example

Install

$ npm install @wonderflow/lighter

lighter({ node, text })

The lighter function accepts two arguments:

  • node (required): a DOM node reference
  • text (required): the text you need to highlight
const lighter = require('@wonderflow/lighter')

lighter({ node: document.querySelector('.test'), text: 'dolor' })

Bundling

On local examples we're using browserify to build the bundle.js file, but you can use any existing bundler with ease like Webpack or Parcel.

Examples

If you run:

$ npm run examples

An http-server instance will boot locally with some examples (look at source code)

Author

Wonderflow

License

This project is licensed under the MIT license. See the LICENSE file for more info.

Releases

No releases published

Packages

No packages published