regexify-string
Advanced tools
Comparing version 1.0.17 to 1.0.18
/// <reference types="react" /> | ||
export interface IDecorateStringWithReactProps { | ||
decorator: (match: string, index: number) => string | JSX.Element; | ||
decorator: (match: string, index: number, result?: RegExpExecArray) => string | JSX.Element; | ||
pattern: RegExp; | ||
@@ -5,0 +5,0 @@ input: string; |
@@ -13,3 +13,3 @@ "use strict"; | ||
var contentBeforeMatch = processedInput.substring(0, matchStartAt); | ||
var decoratedMatch = decorator(match, matchIndex); | ||
var decoratedMatch = decorator(match, matchIndex, result); | ||
output.push(contentBeforeMatch); | ||
@@ -16,0 +16,0 @@ output.push(decoratedMatch); |
{ | ||
"name": "regexify-string", | ||
"version": "1.0.17", | ||
"version": "1.0.18", | ||
"description": "Strings decorator (by regex) with: React components, HTML tags etc.", | ||
@@ -23,3 +23,3 @@ "license": "MIT", | ||
"publishConfig": { | ||
"registry-github": "https://npm.pkg.github.com/@artem-solovev", | ||
"registry-github": "https://npm.pkg.github.com/@kas-elvirov", | ||
"registry-npm": "https://registry.npmjs.org/" | ||
@@ -26,0 +26,0 @@ }, |
export interface IDecorateStringWithReactProps { | ||
decorator: (match: string, index: number) => string | JSX.Element; | ||
decorator: (match: string, index: number, result?: RegExpExecArray) => string | JSX.Element; | ||
pattern: RegExp; | ||
@@ -24,3 +24,3 @@ input: string; | ||
const contentBeforeMatch: string = processedInput.substring(0, matchStartAt); | ||
const decoratedMatch = decorator(match, matchIndex); | ||
const decoratedMatch = decorator(match, matchIndex, result); | ||
@@ -27,0 +27,0 @@ output.push(contentBeforeMatch); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16260
248