Naboo's Podracing Misadventure
Miss any of our Open RFC calls?Watch the recordings here! »

non-sequential-similarity

1.1.2 • Public • Published

Build Status Coverage Branches Coverage Functions Coverage Lines Coverage statements

non-sequential-similarity

NPM package to check similarity among strings by counting letters without caring about the order

Install

npm install non-sequential-similarity

Usage

  // With CommonJS packages
  const NonSequentialSimilarity = require('non-sequential-similarity');

  // With ES6
  import NonSequentialSimilarity from 'non-sequential-similarity'

  console.log(
    NonSequentialSimilarity.similarityRate('another', 'anthoer')
  ) // ==> 0

Results example


  #similarityRate
    ✓ when ["abba","abba"]
      should return 0 (1ms)
    ✓ when ["abba","abbe"]
      should return 0.6666666666666666
    ✓ when ["abba","ccde"]
      should return 1.6
    ✓ when ["$1000","1000"]
      should return 0.3333333333333333
    ✓ when ["Rosario","Rosaro"]
      should return 0.16666666666666666

License

MIT

Install

npm i non-sequential-similarity

DownloadsWeekly Downloads

0

Version

1.1.2

License

MIT

Unpacked Size

87.6 kB

Total Files

27

Last publish

Collaborators

  • avatar