Get unlimited public & private packages + team-based management with npm Teams.Learn more »

@extra-string/matching-ngram-count

1.1.3 • Public • Published

Count matching n-grams between strings.

const matchingNgramCount = require('@extra-string/matching-ngram-count');
// matchingNgramCount(<string-1>, <string-2>, <n>)
 
matchingNgrams('worm', 'storm', 2);
// 2 ('or', 'rm')
matchingNgrams('astronaut', 'astronomer', 3);
// 4 ('ast', 'str', 'tro', 'ron')
matchingNgrams('coconut', 'cotton', 2);
// 2 ('co', 'on')

extra-string

Install

npm i @extra-string/matching-ngram-count

DownloadsWeekly Downloads

0

Version

1.1.3

License

MIT

Unpacked Size

2.7 kB

Total Files

4

Last publish

Collaborators

  • avatar