encoding.d.ts 366 B

123456
  1. /// <reference types="node" />
  2. export declare type TDataOut = string | Buffer;
  3. export declare type TEncodingExtended = BufferEncoding | 'buffer';
  4. export declare const ENCODING_UTF8: BufferEncoding;
  5. export declare function assertEncoding(encoding: string | undefined): void;
  6. export declare function strToEncoding(str: string, encoding?: TEncodingExtended): TDataOut;