@iy4u/common-client-lib
Advanced tools
Comparing version 0.0.39 to 0.0.40
{ | ||
"name": "@iy4u/common-client-lib", | ||
"version": "0.0.39", | ||
"version": "0.0.40", | ||
"description": "IY Foundation Common Library", | ||
@@ -5,0 +5,0 @@ "author": "IY Foundation Development <dev@iy4u.com>", |
@@ -181,3 +181,3 @@ import * as components from './components'; | ||
}, | ||
$highlight(words, query) { | ||
$highlight(words, query, color = 'orange') { | ||
if (!query) return words; | ||
@@ -188,3 +188,3 @@ let low_search_list = query.toLowerCase().trim().split(/[ ,]+/); | ||
return words.toString().replace(iQuery, function (matchedTxt) { | ||
return ('<span style=\'background-color: orange;\'>' + matchedTxt + '</span>'); | ||
return (`<span style='background-color: ${color};'>` + matchedTxt + '</span>'); | ||
}); | ||
@@ -191,0 +191,0 @@ }, |
128390