@types/levenshtein
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

Installation

npm install --save @types/levenshtein

Summary

This package contains type definitions for levenshtein (https://github.com/gf3/Levenshtein).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/levenshtein.

index.d.ts

declare class Levenshtein {
    /**
     * Levenshtein string difference
     * @param m First string
     * @param n Second string
     */
    constructor(m: string, n: string);

    /**
     * Distance between strings
     */
    distance: number;

    /**
     * Distance between strings
     * Alias of distance
     */
    valueOf(): number;

    /**
     * Pretty print Levenshtein table.
     */
    inspect(): string;

    /**
     * Pretty print Levenshtein table.
     * Alias of inspect()
     */
    toString(): string;

    /**
     * Return the Levenshtein table.
     */
    getMatrix(): number[][];
}

// Required to make import as syntax work
declare namespace Levenshtein {
}

export = Levenshtein;

Additional Details

  • Last updated: Tue, 07 Nov 2023 09:09:38 GMT
  • Dependencies: none

Credits

These definitions were written by Joshua DeVinney.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/levenshtein

Weekly Downloads

3,220

Version

1.0.4

License

MIT

Unpacked Size

3.99 kB

Total Files

5

Last publish

Collaborators

  • types