Package Exports
- color-prototypes
- color-prototypes/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (color-prototypes) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
color-prototypes
String and Number to color prototype library
Installation
yarn add color-prototypesornpm install color-prototypes
Implementation
import module on indexfile of your project or directly on your desired file
import 'color-prototypes'Usage
console.log(`0.098218011123`.toBlue())Types
declare global {
export type CliColor = (text: string) => string;
interface CliColors {
black: CliColor;
red: CliColor;
green: CliColor;
yellow: CliColor;
blue: CliColor;
magenta: CliColor;
cyan: CliColor;
white: CliColor;
}
interface String {
toBlack: () => string;
toRed: () => string;
toGreen: () => string;
toYellow: () => string;
toBlue: () => string;
toMagenta: () => string;
toCyan: () => string;
toWhite: () => string;
}
interface Number {
toBlack: () => string;
toRed: () => string;
toGreen: () => string;
toYellow: () => string;
toBlue: () => string;
toMagenta: () => string;
toCyan: () => string;
toWhite: () => string;
}
}
export {};