npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

symlar

v1.1.6

Published

compute and verify string similarity

Readme

Verification is 1-2 orders of magnitude faster than other libraries (leven, talisman, fast-levenshtein, js-levenshtein, levenshtein-edit-distance):

$ node benchmarks.js

 COMPUTATION VS VERIFICATION OF LEVENSHTEIN DISTANCE:

        symlar/lev                x 41.88 ops/sec ±5.40% (54 runs sampled)
        symlar/vlev               x 1,135 ops/sec ±1.26% (90 runs sampled)
        symlar/eddist             x 36.43 ops/sec ±1.02% (62 runs sampled)
        symlar/veddist            x 972 ops/sec ±1.46% (89 runs sampled)
        leven                     x 65.14 ops/sec ±0.70% (66 runs sampled)
        talisman                  x 81.01 ops/sec ±0.71% (69 runs sampled)
        fast-levenshtein          x 57.93 ops/sec ±1.07% (66 runs sampled)
        js-levenshtein            x 96.58 ops/sec ±1.40% (69 runs sampled)
        levenshtein-edit-distance x 62.36 ops/sec ±1.18% (64 runs sampled)

        fastest is symlar/vlev

Full API documentation

Install

npm i symlar

Usage

Node

$ node
> symlar = require('./symlar')

{ GAP: [Getter],
  LEVENSHTEIN: [Getter],
  EN_GB_PHONE: [Getter],
  eddist: [Getter],
  veddist: [Getter],
  lev: [Getter],
  vlev: [Getter],
  edsim: [Getter],
  vedsim: [Getter],
  phonesim: [Getter],
  vphonesim: [Getter] }

levenshtein distance

> symlar.lev('SIMILARITY', 'SIMILAR')

3

verify levenshtein distance

> symlar.vlev('SIMILARITY', 'SIMILAR', 3)

true

edit similarity

> symlar.edsim('SYMLAR', 'SIMILAR', sym.LEVENSHTEIN)

0.7142857142857143

verify edit similarity

> symlar.vedsim('SYMLAR', 'SIMILAR', sym.LEVENSHTEIN, .7)

true

phonetic similarity

> symlar.phonesim('SOW', 'SEW')

1

verify phonetic similarity

> symlar.vphonesim('SOW', 'SEW', .9)

true

custom edit similarity

> symlar.edsim('SYMLAR', 'SIMILAR', (L, R) => +(L !== R)*.5)

0.85

custom weighted edit distance

> symlar.eddist('SIMILARITY', 'SIMILAR',(L, R) => +(L !== R)*.5)

1.5

verify weighted edit distance

> symlar.veddist('SIMILARITY', 'SIMILAR',(L, R) => +(L !== R)*.5, 1)

false

Browser

<script src='symlar.js'></script>

symlar will be available as a global

Full API documentation

npm tasks

test

npm test

Tests are slow due to there being thousands of them, as the functions are tested generatively

coverage

npm run cover

benchmark

npm run bench

License

MIT © Jose Llarena