@types/chardet
TypeScript definitions for chardet
Last updated 8 years ago by types .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install @types/chardet 
SYNC missed versions from official npm registry.

Installation

npm install --save @types/chardet

Summary

This package contains type definitions for chardet (https://github.com/runk/node-chardet).

Details

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

index.d.ts

// Type definitions for chardet 0.8
// Project: https://github.com/runk/node-chardet
// Definitions by: Hauke Oldsen <https://github.com/Gebatzens>
//                 Sam Hinshaw <https://github.com/samhinshaw>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

/// <reference types="node" />

export interface Confidence {
    name: string;
    confidence: number;
    lang?: string | undefined;
}

export interface Options {
    returnAllMatches?: boolean | undefined;
    sampleSize?: number | undefined;
}

// As of v0.6, these fns return the highest-confidence result
export function detect(buf: Buffer, opts?: Options): string | null;

export function detectFile(path: string, cb: (err: any, result: string | null) => void): void;
export function detectFile(path: string, opts: Options, cb: (err: any, result: string | null) => void): void;

export function detectFileSync(path: string, opts?: Options): string | null;

// These fns were introduced in v0.6 to return an array of confidences.
export function detectAll(buf: Buffer, opts?: Options): Confidence[] | null;

export function detectFileAll(path: string, cb: (err: any, result: Confidence[] | null) => void): void;
export function detectFileAll(path: string, opts: Options, cb: (err: any, result: Confidence[] | null) => void): void;

export function detectFileAllSync(path: string, opts?: Options): Confidence[] | null;

Additional Details

  • Last updated: Tue, 06 Jul 2021 18:05:50 GMT
  • Dependencies: @types/node
  • Global values: none

Credits

These definitions were written by Hauke Oldsen, and Sam Hinshaw.

Current Tags

  • 0.8.1                                ...           latest (5 years ago)
  • 0.8.0                                ...           ts2.0 (6 years ago)
  • 0.8.0                                ...           ts2.1 (6 years ago)
  • 0.8.0                                ...           ts2.2 (6 years ago)
  • 0.8.0                                ...           ts2.3 (6 years ago)
  • 0.8.0                                ...           ts2.4 (6 years ago)
  • 0.8.0                                ...           ts2.5 (6 years ago)
  • 0.8.0                                ...           ts2.6 (6 years ago)
  • 0.8.0                                ...           ts2.7 (6 years ago)
  • 0.8.0                                ...           ts2.8 (6 years ago)
  • 0.8.0                                ...           ts2.9 (6 years ago)
  • 0.8.0                                ...           ts3.0 (6 years ago)
  • 0.8.0                                ...           ts3.1 (6 years ago)
  • 0.8.0                                ...           ts3.2 (6 years ago)
  • 0.8.0                                ...           ts3.3 (6 years ago)
  • 0.8.0                                ...           ts3.4 (6 years ago)
  • 0.8.0                                ...           ts3.5 (6 years ago)
  • 0.8.1                                ...           ts3.6 (5 years ago)
  • 0.8.1                                ...           ts3.7 (5 years ago)
  • 0.8.1                                ...           ts3.8 (5 years ago)
  • 0.8.1                                ...           ts3.9 (5 years ago)
  • 0.8.1                                ...           ts4.0 (5 years ago)
  • 0.8.1                                ...           ts4.1 (5 years ago)
  • 0.8.1                                ...           ts4.2 (5 years ago)
  • 0.8.1                                ...           ts4.3 (5 years ago)
  • 0.8.1                                ...           ts4.4 (5 years ago)
  • 0.8.1                                ...           ts4.5 (5 years ago)
  • 0.8.1                                ...           ts4.6 (5 years ago)
  • 0.8.1                                ...           ts4.7 (5 years ago)
  • 0.8.1                                ...           ts4.8 (5 years ago)
  • 0.8.1                                ...           ts4.9 (5 years ago)

3 Versions

  • 0.8.1                                ...           5 years ago
  • 0.8.0                                ...           6 years ago
  • 0.5.0                                ...           8 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 0
Dependencies (1)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org | Home |