npm.io
1.0.3 • Published 2 years ago

@types/is-color

Licence
MIT
Version
1.0.3
Deps
0
Size
4 kB
Vulns
0
Weekly
0

Installation

npm install --save @types/is-color

Summary

This package contains type definitions for is-color (https://github.com/morishitter/is-color).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/is-color.

index.d.ts

declare function isColor(str: string): boolean;

declare namespace isColor {
    function isRgb(str: string): boolean;
    function isRgba(str: string): boolean;
    function isHsl(str: string): boolean;
    function isHsla(str: string): boolean;
    function isHex(str: string): boolean;
    function isKeyword(str: string): boolean;
    function isInherit(str: string): str is "inherit";
    function isCurrentColor(str: string): str is "currentColor" | "currentcolor";
    function isTransparent(str: string): str is "transparent";
}

export = isColor;

Additional Details

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

Credits

These definitions were written by Vitor Luiz Cavalcanti.