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

5.0.3 • Public • Published

Installation

npm install --save @types/franc

Summary

This package contains type definitions for franc (https://github.com/wooorm/franc/).

Details

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

index.d.ts

// ISO 639-3 code (see: https://iso639-3.sil.org/code_tables/639/data)
type ISO6393 = string;

// Range [0, 1]
type Confidence = number;

interface Options {
    minLength?: number | undefined;
    whitelist?: ISO6393[] | undefined;
    blacklist?: ISO6393[] | undefined;
    only?: ISO6393[] | undefined;
}

declare function detect(text: string, options?: Options): ISO6393;

declare namespace detect {
    function all(text: string, options?: Options): Array<[ISO6393, Confidence]>;
}

export = detect;

Additional Details

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

Credits

These definitions were written by William LeGate.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/franc

Weekly Downloads

3,792

Version

5.0.3

License

MIT

Unpacked Size

3.51 kB

Total Files

5

Last publish

Collaborators

  • types