0.4.3 • Published 7 years ago
react-highlighter v0.4.3
react-highlighter
Highlight select fragments of a string using an HTML element and/or a class.
Installation
npm install react-highlighter --saveUsage
var Highlight = require('react-highlighter');
<Highlight search="brown">The quick brown fox jumps over the lazy dog</Highlight>Props
search: The string of text (or Regular Expression) to highlightcaseSensitive: Determine whether string matching should be case-sensitive. Not applicable to regular expression searches. Defaults tofalseignoreDiacritics: Determine whether string matching should ignore diacritics. Defaults tofalsediacriticsBlacklist: These chars are treated like characters that don't have any diacritics. Not applicable ignoreDiacritics isfalse. Defaults to nonematchElement: HTML tag name to wrap around highlighted text. Defaults tomarkmatchClass: HTML class to wrap around highlighted text. Defaults tohighlightmatchStyle: Custom style for the match element around highlighted text.
Development
Testing
Using Mocha/Chai/React.addons.TestUtils for testing.
npm testCode Coverage
Generate a report using Istanbul to make sure your tests are touching everything! FYI, Travis will fail the build if there isn't at least 90% of statement coverage and 100% function coverage.
npm run coverageCoveralls.io integration requires that the environment variable COVERALLS_REPO_TOKEN is set.
0.4.3
7 years ago
0.4.2
8 years ago
0.4.1
8 years ago
0.4.0
8 years ago
0.3.5
8 years ago
0.3.4
8 years ago
0.3.3
9 years ago
0.3.2
10 years ago
0.3.1
10 years ago
0.3.0
10 years ago
0.2.4
10 years ago
0.2.3
10 years ago
0.2.2
11 years ago
0.2.1
11 years ago
0.2.0
11 years ago
0.1.1
11 years ago
0.0.4
11 years ago
0.0.3
11 years ago
0.0.2
11 years ago
0.0.1
11 years ago