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

react-highlight-words

Package Overview
Dependencies
Maintainers
2
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-highlight-words - npm Package Compare versions

Comparing version 0.4.1 to 0.5.0

6

dist/main.js

@@ -92,2 +92,3 @@ module.exports =

highlightClassName: _react.PropTypes.string,
highlightTag: _react.PropTypes.string,
highlightStyle: _react.PropTypes.object,

@@ -110,2 +111,4 @@ searchWords: _react.PropTypes.arrayOf(_react.PropTypes.string).isRequired,

var highlightStyle = _ref$highlightStyle === undefined ? {} : _ref$highlightStyle;
var _ref$highlightTag = _ref.highlightTag;
var highlightTag = _ref$highlightTag === undefined ? 'mark' : _ref$highlightTag;
var searchWords = _ref.searchWords;

@@ -121,2 +124,3 @@ var textToHighlight = _ref.textToHighlight;

});
var HighlightTag = highlightTag;

@@ -131,3 +135,3 @@ return _react2['default'].createElement(

return _react2['default'].createElement(
'mark',
HighlightTag,
{

@@ -134,0 +138,0 @@ className: highlightClassName,

2

package.json
{
"name": "react-highlight-words",
"version": "0.4.1",
"version": "0.5.0",
"description": "React component to highlight words within a larger body of text",

@@ -5,0 +5,0 @@ "main": "dist/main.js",

@@ -30,2 +30,3 @@ <img src="https://cloud.githubusercontent.com/assets/29597/11913937/0d2dcd78-a629-11e5-83e7-6a17b6d765a5.png" width="260" height="260">

| highlightStyle | Object | | Inline styles applied to highlighted text |
| highlightTag | String | | Type of tag to wrap around highlighted matches; defaults to `mark` |
| sanitize | Function | | Process each search word and text to highlight before comparing (eg remove accents); signature `(text: string): string` |

@@ -32,0 +33,0 @@ | searchWords | Array<String> | ✓ | Array of search words |

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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