• Stars
    star
    278
  • Rank 144,911 (Top 3 %)
  • Language
    JavaScript
  • License
    The Unlicense
  • Created almost 14 years ago
  • Updated about 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Javascript implementation of the L-diggity.

Levenshtein

Levenshtein string difference in Javascript.

Screenshot

Levenshtein also does some neat things like coerce to a number and string appropriately. So you can compare Levenshtein objects directly! Not to mention it has specs!

API

  • new Levenshtein( m, n ) → Levenshtein

    • m ( String ): First string.
    • n ( String ): Second string.
    • Initialise a new Levenshtein object.
  • Levenshtein#distance → Number

    • Distance between strings.
  • Levenshtein#inspect() → String

    • Pretty print Levenshtein table.
  • Levenshtein#toString() → String

    • Alias of: Levenshtein#inspect().
  • Levenshtein#valueOf() → Number

    • Alias of: Levenshtein#distance.

Installation

Levenshtein works in both the browser and node.js.

Browser

Simply include levenshtein.js:

<script src="/javascripts/levenshtein.js"></script>

NPM

Install via npm:

npm install levenshtein

Or put it in your package.json:

{ "levenshtein": "~1.0" }

Bower

bower install levenshtein

Git

git clone git://github.com/gf3/Levenshtein.git

License

Levenshtein is UNLICENSED.

Author

Written by Gianni Chiappetta – heavycorp.io

More Repositories

1

dotfiles

Configurations for the tools I use every day
Emacs Lisp
1,040
star
2

sandbox

A nifty JavaScript sandbox for Node.js
JavaScript
836
star
3

IRC-js

The best IRC library for node.js
JavaScript
179
star
4

WAT

LOLWAT?
107
star
5

Jerk

Stupidly simple IRC bots in Javascript.
JavaScript
106
star
6

protobot

Prototype IRC Bot
JavaScript
57
star
7

haml.mode

HAML syntax definition for Coda & SubEthaEdit
44
star
8

texpand

Textarea auto-expander.
JavaScript
33
star
9

CLJBIN

A Clojure pastebin with code evaluation.
Clojure
33
star
10

TRNSFR

A Transmit 4-inspired multi progress bar.
JavaScript
22
star
11

butts

#butts
21
star
12

JS-strftime

Ruby-like strftime for javascript, because date-formatting is a pain.
JavaScript
18
star
13

hinttext

Hint text the right way.
JavaScript
14
star
14

peg.vim

PEG Syntax for Vim
Vim Script
14
star
15

coloured

Pretty colours in your terminal.
JavaScript
9
star
16

twatlr.com

Twatlr web service
JavaScript
8
star
17

molotov

The exciting colour scheme that will make you code goodâ„¢
Vim Script
6
star
18

Get-Off-My-Lawn

Safari version of Mike Taylor's "Get Off My Lawn" extension for Opera.
JavaScript
5
star
19

Rumen

Data extraction.
Ruby
5
star
20

butt.zone

What a nice place for a website.
HTML
5
star
21

oxpecker

Sandboxed javascript in ruby.
Ruby
4
star
22

docker-mongosh

Docker image for mongosh
Dockerfile
4
star
23

pancake

A user style to simplify waffle.io
CSS
4
star
24

clavatar-js

A ClojureScript port of Rayne's clavatar. This is a library to generate Gravatar URLs from email addresses.
JavaScript
4
star
25

snack

Please ignore
C
3
star
26

akahn-slash-asterisk

akahn/*
3
star
27

dom.js

Functional DOM-ination
JavaScript
3
star
28

Twatlr

Easy Twitter threads.
Racket
3
star
29

crapshot

crappy web screenshots (html → pdf)
C++
2
star
30

ring-cssgen

Ring middleware to automatically compile and regenerate your cssgen stylesheets.
Clojure
2
star
31

proto-misc

Miscellaneous tasty paste.
JavaScript
2
star
32

SCRLLR

Make great scrollings of the elements!!!
JavaScript
2
star
33

readthefuckingspec

Read the fucking spec.
Ruby
2
star
34

monads

Simple Ruby implementations of some common monads.
Ruby
2
star
35

jennmoney.biz

the official site of olive garden's favorite twitter account
1
star
36

musex

Ruby
1
star
37

gf3

Private!
1
star
38

Resume

Curriculum Vitae
1
star
39

api-extractor-issue

TypeScript
1
star
40

ember-load-helpers

Autoload and register ember helpers
JavaScript
1
star
41

blog_os

Writing an OS in Rust
HTML
1
star