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.7.2 to 0.8.0

19

dist/main.js

@@ -95,11 +95,13 @@ module.exports =

activeClassName: _propTypes2['default'].string,
activeIndex: _propTypes2['default'].string,
activeIndex: _propTypes2['default'].number,
autoEscape: _propTypes2['default'].bool,
className: _propTypes2['default'].string,
highlightClassName: _propTypes2['default'].string,
highlightStyle: _propTypes2['default'].object,
highlightTag: _propTypes2['default'].string,
highlightStyle: _propTypes2['default'].object,
sanitize: _propTypes2['default'].func,
searchWords: _propTypes2['default'].arrayOf(_propTypes2['default'].string).isRequired,
textToHighlight: _propTypes2['default'].string.isRequired,
sanitize: _propTypes2['default'].func
unhighlightClassName: _propTypes2['default'].string,
unhighlightStyle: _propTypes2['default'].object
};

@@ -125,5 +127,8 @@

var highlightTag = _ref$highlightTag === undefined ? 'mark' : _ref$highlightTag;
var sanitize = _ref.sanitize;
var searchWords = _ref.searchWords;
var textToHighlight = _ref.textToHighlight;
var sanitize = _ref.sanitize;
var _ref$unhighlightClassName = _ref.unhighlightClassName;
var unhighlightClassName = _ref$unhighlightClassName === undefined ? '' : _ref$unhighlightClassName;
var unhighlightStyle = _ref.unhighlightStyle;

@@ -162,3 +167,7 @@ var chunks = (0, _highlightWordsCore.findAll)({

'span',
{ key: index },
{
className: unhighlightClassName,
key: index,
style: unhighlightStyle
},
text

@@ -165,0 +174,0 @@ );

{
"name": "react-highlight-words",
"version": "0.7.2",
"version": "0.8.0",
"description": "React component to highlight words within a larger body of text",

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

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

| textToHighlight | String | ✓ | Text to highlight matches in |
| unhighlightClassName | String | | CSS class name applied to unhighlighted text |
| unhighlightStyle | Object | | Inline styles applied to unhighlighted text |

@@ -39,0 +41,0 @@ ## Installation

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