Interface StringComparisonOptions

interface StringComparisonOptions {
    transforms?: StringTransformFunc[];
    strategies?: ComparisonStrategy<ComparisonStrategyResultValue>[];
    reorder?: boolean;
    delimiter?: string | RegExp;
}

Properties

transforms?: StringTransformFunc[]

An array of transformations to apply to each string before comparing similarity

An array of strategies used to score similarity. All strategies scores are combined for an average high score.

reorder?: boolean

Reorder second string so its token match order of first string as closely as possible

Useful when only the differences in content are important, but not the order of the content

delimiter?: string | RegExp

When reorder is used this determines how to split each string into the tokens that will be reordered.

The value of this property is used in String.split() -- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split#separator

" "