npm.io
1.0.2 • Published 2 years ago

@types/strong-data-uri

Licence
MIT
Version
1.0.2
Deps
1
Size
4 kB
Vulns
0
Weekly
0
Stars
51.4K

Installation

npm install --save @types/strong-data-uri

Summary

This package contains type definitions for strong-data-uri (github.com/strongloop/strong-data-uri).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/strong-data-uri.

index.d.ts

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

export interface DataURI extends Buffer {
    mimetype: string;
    mediatype: string;
    charset: string | null;
}

/**
 * Parser for retrieving data encoded in data: URIs specified by RFC2397.
 *
 * @param uri data URI
 * @see https://www.ietf.org/rfc/rfc2397.txt
 */
export function decode(uri: string): Buffer & DataURI;

/**
 * Encoder to create data URIs specified by RFC2397.
 *
 * @param uri data URI
 * @see https://www.ietf.org/rfc/rfc2397.txt
 */
export function encode(input: Buffer | string, mediatype?: string): string;

Additional Details

  • Last updated: Tue, 07 Nov 2023 1536 GMT
  • Dependencies: @types/node

Credits

These definitions were written by Martin Heidegger.