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

1.0.3 • Public • Published

Installation

npm install --save @types/original

Summary

This package contains type definitions for original (https://github.com/unshiftio/original).

Details

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

index.d.ts

/**
 * Transform an URL to a valid origin value.
 *
 * @param url URL to transform to it's origin.
 * @returns The origin.
 * @api public
 */
declare function origin(url: string | object | { protocol: string; host: string }): string;

declare namespace origin {
    /**
     * Check if the origins are the same.
     *
     * @param a URL or origin of a.
     * @param b URL or origin of b.
     * @returns true if origins are the same, false otherwise
     * @api public
     */
    function same(a: string, b: string): boolean;
}

export = origin;

Additional Details

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

Credits

These definitions were written by Wayne Carson.

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i @types/original

      Weekly Downloads

      1,310

      Version

      1.0.3

      License

      MIT

      Unpacked Size

      3.62 kB

      Total Files

      5

      Last publish

      Collaborators

      • types