Socket
Socket
Sign inDemoInstall

highlight-words-core

Package Overview
Dependencies
Maintainers
0
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

highlight-words-core - npm Package Compare versions

Comparing version 1.2.2 to 1.2.3

4

dist/index.js

@@ -144,5 +144,5 @@ module.exports =

var prevChunk = processedChunks.pop();
if (nextChunk.start <= prevChunk.end) {
if (nextChunk.start < prevChunk.end) {
// It may be the case that prevChunk completely surrounds nextChunk, so take the
// largest of the end indeces.
// largest of the end indexes.
var endIndex = Math.max(prevChunk.end, nextChunk.end);

@@ -149,0 +149,0 @@ processedChunks.push({ highlight: false, start: prevChunk.start, end: endIndex });

{
"name": "highlight-words-core",
"description": "Utility functions shared by react-highlight-words and react-native-highlight-words",
"version": "1.2.2",
"version": "1.2.3",
"author": "Brian Vaughn <brian.david.vaughn@gmail.com>",

@@ -66,2 +66,2 @@ "license": "MIT",

}
}
}
Utility functions shared by [`react-highlight-words`](https://github.com/bvaughn/react-highlight-words) and [`react-native-highlight-words`](https://github.com/clauderic/react-native-highlight-words).
---
### 🎉 [Become a sponsor](https://github.com/sponsors/bvaughn/) or ☕ [Buy me a coffee](http://givebrian.coffee/)
---
## API

@@ -4,0 +8,0 @@

@@ -60,5 +60,5 @@ // @flow

const prevChunk = processedChunks.pop()
if (nextChunk.start <= prevChunk.end) {
if (nextChunk.start < prevChunk.end) {
// It may be the case that prevChunk completely surrounds nextChunk, so take the
// largest of the end indeces.
// largest of the end indexes.
const endIndex = Math.max(prevChunk.end, nextChunk.end)

@@ -65,0 +65,0 @@ processedChunks.push({highlight: false, start: prevChunk.start, end: endIndex})

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