Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kyranet/levenshtein-wasm

An experimental lightning-fast Wasm-compiled levenshtein library.
https://github.com/kyranet/levenshtein-wasm

assemblyscript levenshtein levenshtein-distance wasm webassembly

Last synced: 5 days ago
JSON representation

An experimental lightning-fast Wasm-compiled levenshtein library.

Awesome Lists containing this project

README

        

# Levenshtein Wasm




NPM version


NPM downloads


Build status


Total alerts


Dependabot Status


Patreon



npm installnfo


🚀 Experimental Wasm library made using [AssemblyScript](https://github.com/AssemblyScript) to convert strict
[TypeScript](https://www.typescriptlang.org/) into fast and optimized [Web Assembly](https://webassembly.org/) binaries.

## Examples

`levenshtein-wasm` only exports a function, named `levenshtein`, which takes two strings and returns its
[Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance):

```javascript
const { levenshtein } = require('levenshtein-wasm');
// const levenshtein = require('levenshtein-wasm').levenshtein;
// import { levenshtein } from 'levenshtein-wasm';

console.log(levenshtein('cat', 'cow'));
// -> 2
```

## Contributing

1. Fork it!
1. Create your feature branch: `git checkout -b my-new-feature`
1. Commit your changes: `git commit -am 'Add some feature'`
1. Push to the branch: `git push origin my-new-feature`
1. Submit a pull request!

## Author

**levenshtein-wasm** © [kyranet](https://github.com/kyranet), released under the
[MIT](https://github.com/kyranet/levenshtein-wasm/blob/master/LICENSE) License.
Authored and maintained by kyranet.

> Github [kyranet](https://github.com/kyranet) - Twitter [@kyranet_](https://twitter.com/kyranet_)