Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@wonderflow/lighter

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wonderflow/lighter

Highlight words in a HTML page with ease

  • 1.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

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.

FAQs

Package last updated on 31 Jan 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc