colors-1.4.0 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of colors-1.4.0 might be problematic. Click here for more details.
- package/LICENSE +25 -0
- package/README.md +221 -0
- package/examples/normal-usage.js +82 -0
- package/examples/safe-string.js +79 -0
- package/index.d.ts +136 -0
- package/lib/colors.js +213 -0
- package/lib/custom/trap.js +46 -0
- package/lib/custom/zalgo.js +110 -0
- package/lib/extendStringPrototype.js +110 -0
- package/lib/index.js +13 -0
- package/lib/maps/america.js +10 -0
- package/lib/maps/rainbow.js +12 -0
- package/lib/maps/random.js +11 -0
- package/lib/maps/zebra.js +5 -0
- package/lib/styles.js +95 -0
- package/lib/system/has-flag.js +35 -0
- package/lib/system/supports-colors.js +151 -0
- package/package.json +55 -0
- package/safe.d.ts +48 -0
- package/safe.js +10 -0
- package/themes/generic-logging.js +12 -0
package/safe.d.ts
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
// Type definitions for Colors.js 1.2
|
2
|
+
// Project: https://github.com/Marak/colors.js
|
3
|
+
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>, Staffan Eketorp <https://github.com/staeke>
|
4
|
+
// Definitions: https://github.com/Marak/colors.js
|
5
|
+
|
6
|
+
export const enabled: boolean;
|
7
|
+
export function enable(): void;
|
8
|
+
export function disable(): void;
|
9
|
+
export function setTheme(theme: any): void;
|
10
|
+
|
11
|
+
export function strip(str: string): string;
|
12
|
+
export function stripColors(str: string): string;
|
13
|
+
|
14
|
+
export function black(str: string): string;
|
15
|
+
export function red(str: string): string;
|
16
|
+
export function green(str: string): string;
|
17
|
+
export function yellow(str: string): string;
|
18
|
+
export function blue(str: string): string;
|
19
|
+
export function magenta(str: string): string;
|
20
|
+
export function cyan(str: string): string;
|
21
|
+
export function white(str: string): string;
|
22
|
+
export function gray(str: string): string;
|
23
|
+
export function grey(str: string): string;
|
24
|
+
|
25
|
+
export function bgBlack(str: string): string;
|
26
|
+
export function bgRed(str: string): string;
|
27
|
+
export function bgGreen(str: string): string;
|
28
|
+
export function bgYellow(str: string): string;
|
29
|
+
export function bgBlue(str: string): string;
|
30
|
+
export function bgMagenta(str: string): string;
|
31
|
+
export function bgCyan(str: string): string;
|
32
|
+
export function bgWhite(str: string): string;
|
33
|
+
|
34
|
+
export function reset(str: string): string;
|
35
|
+
export function bold(str: string): string;
|
36
|
+
export function dim(str: string): string;
|
37
|
+
export function italic(str: string): string;
|
38
|
+
export function underline(str: string): string;
|
39
|
+
export function inverse(str: string): string;
|
40
|
+
export function hidden(str: string): string;
|
41
|
+
export function strikethrough(str: string): string;
|
42
|
+
|
43
|
+
export function rainbow(str: string): string;
|
44
|
+
export function zebra(str: string): string;
|
45
|
+
export function america(str: string): string;
|
46
|
+
export function trap(str: string): string;
|
47
|
+
export function random(str: string): string;
|
48
|
+
export function zalgo(str: string): string;
|
package/safe.js
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
//
|
2
|
+
// Remark: Requiring this file will use the "safe" colors API,
|
3
|
+
// which will not touch String.prototype.
|
4
|
+
//
|
5
|
+
// var colors = require('colors/safe');
|
6
|
+
// colors.red("foo")
|
7
|
+
//
|
8
|
+
//
|
9
|
+
var colors = require('./lib/colors');
|
10
|
+
module['exports'] = colors;
|