npm.io
1.5.7 • Published 2 years ago

@types/mapbox__s3urls

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

Installation

npm install --save @types/mapbox__s3urls

Summary

This package contains type definitions for @mapbox/s3urls (https://github.com/mapbox/s3urls).

Details

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

index.d.ts

/* eslint-disable @definitelytyped/no-declare-current-package */
// eslint-disable-next-line @definitelytyped/no-single-declare-module
declare module "@mapbox/s3urls" {
    function fromUrl(
        url: string,
    ): { Bucket: string | undefined; Key: string | undefined };

    function toUrl(
        bucket: string,
        key: string,
    ): {
        s3: string;
        "bucket-in-path": string;
        "bucket-in-host": string;
    };

    function convert(
        url: string,
        to: "s3" | "bucket-in-path" | "bucket-in-host",
    ): string;

    function signed(
        url: string,
        expires: number,
        cb: (err: Error | undefined, url: string) => void,
    ): void;

    function valid(url: string): boolean;
}

Additional Details

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

Credits

These definitions were written by Sebastian Vera.