typespeed 2.4.1 → 2.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (246) hide show
  1. package/dist/introduction/decorator/example-import.class.js +17 -0
  2. package/dist/introduction/decorator/main-app.js +14 -0
  3. package/dist/introduction/decorator/main-decorator.js +127 -0
  4. package/dist/introduction/decorator/main-import.js +1 -0
  5. package/dist/introduction/decorator/main-reflect.js +38 -0
  6. package/dist/introduction/web-services/db-init.js +33 -0
  7. package/dist/introduction/web-services/db-singleton.js +49 -0
  8. package/dist/introduction/web-services/http-if.js +12 -0
  9. package/dist/introduction/web-services/http-init.js +7 -0
  10. package/dist/introduction/web-services/http-router.js +23 -0
  11. package/dist/{database.decorator.js → src/database.decorator.js} +2 -4
  12. package/package.json +2 -4
  13. package/src/database.decorator.ts +2 -4
  14. package/tsconfig.json +2 -1
  15. package/app/node_modules/.package-lock.json +0 -134
  16. package/app/node_modules/@types/body-parser/LICENSE +0 -21
  17. package/app/node_modules/@types/body-parser/README.md +0 -16
  18. package/app/node_modules/@types/body-parser/index.d.ts +0 -107
  19. package/app/node_modules/@types/body-parser/package.json +0 -58
  20. package/app/node_modules/@types/connect/LICENSE +0 -21
  21. package/app/node_modules/@types/connect/README.md +0 -16
  22. package/app/node_modules/@types/connect/index.d.ts +0 -93
  23. package/app/node_modules/@types/connect/package.json +0 -32
  24. package/app/node_modules/@types/express/LICENSE +0 -21
  25. package/app/node_modules/@types/express/README.md +0 -16
  26. package/app/node_modules/@types/express/index.d.ts +0 -136
  27. package/app/node_modules/@types/express/package.json +0 -45
  28. package/app/node_modules/@types/express-serve-static-core/LICENSE +0 -21
  29. package/app/node_modules/@types/express-serve-static-core/README.md +0 -16
  30. package/app/node_modules/@types/express-serve-static-core/index.d.ts +0 -1281
  31. package/app/node_modules/@types/express-serve-static-core/package.json +0 -55
  32. package/app/node_modules/@types/mime/LICENSE +0 -21
  33. package/app/node_modules/@types/mime/Mime.d.ts +0 -10
  34. package/app/node_modules/@types/mime/README.md +0 -16
  35. package/app/node_modules/@types/mime/index.d.ts +0 -35
  36. package/app/node_modules/@types/mime/lite.d.ts +0 -7
  37. package/app/node_modules/@types/mime/package.json +0 -29
  38. package/app/node_modules/@types/node/LICENSE +0 -21
  39. package/app/node_modules/@types/node/README.md +0 -16
  40. package/app/node_modules/@types/node/assert/strict.d.ts +0 -8
  41. package/app/node_modules/@types/node/assert.d.ts +0 -961
  42. package/app/node_modules/@types/node/async_hooks.d.ts +0 -518
  43. package/app/node_modules/@types/node/buffer.d.ts +0 -2323
  44. package/app/node_modules/@types/node/child_process.d.ts +0 -1399
  45. package/app/node_modules/@types/node/cluster.d.ts +0 -410
  46. package/app/node_modules/@types/node/console.d.ts +0 -412
  47. package/app/node_modules/@types/node/constants.d.ts +0 -18
  48. package/app/node_modules/@types/node/crypto.d.ts +0 -3973
  49. package/app/node_modules/@types/node/dgram.d.ts +0 -545
  50. package/app/node_modules/@types/node/diagnostics_channel.d.ts +0 -192
  51. package/app/node_modules/@types/node/dns/promises.d.ts +0 -370
  52. package/app/node_modules/@types/node/dns.d.ts +0 -660
  53. package/app/node_modules/@types/node/dom-events.d.ts +0 -126
  54. package/app/node_modules/@types/node/domain.d.ts +0 -170
  55. package/app/node_modules/@types/node/events.d.ts +0 -682
  56. package/app/node_modules/@types/node/fs/promises.d.ts +0 -1159
  57. package/app/node_modules/@types/node/fs.d.ts +0 -3976
  58. package/app/node_modules/@types/node/globals.d.ts +0 -303
  59. package/app/node_modules/@types/node/globals.global.d.ts +0 -1
  60. package/app/node_modules/@types/node/http.d.ts +0 -1714
  61. package/app/node_modules/@types/node/http2.d.ts +0 -2133
  62. package/app/node_modules/@types/node/https.d.ts +0 -542
  63. package/app/node_modules/@types/node/index.d.ts +0 -134
  64. package/app/node_modules/@types/node/inspector.d.ts +0 -2741
  65. package/app/node_modules/@types/node/module.d.ts +0 -115
  66. package/app/node_modules/@types/node/net.d.ts +0 -883
  67. package/app/node_modules/@types/node/os.d.ts +0 -473
  68. package/app/node_modules/@types/node/package.json +0 -237
  69. package/app/node_modules/@types/node/path.d.ts +0 -191
  70. package/app/node_modules/@types/node/perf_hooks.d.ts +0 -625
  71. package/app/node_modules/@types/node/process.d.ts +0 -1488
  72. package/app/node_modules/@types/node/punycode.d.ts +0 -117
  73. package/app/node_modules/@types/node/querystring.d.ts +0 -131
  74. package/app/node_modules/@types/node/readline/promises.d.ts +0 -143
  75. package/app/node_modules/@types/node/readline.d.ts +0 -653
  76. package/app/node_modules/@types/node/repl.d.ts +0 -424
  77. package/app/node_modules/@types/node/stream/consumers.d.ts +0 -12
  78. package/app/node_modules/@types/node/stream/promises.d.ts +0 -42
  79. package/app/node_modules/@types/node/stream/web.d.ts +0 -330
  80. package/app/node_modules/@types/node/stream.d.ts +0 -1440
  81. package/app/node_modules/@types/node/string_decoder.d.ts +0 -67
  82. package/app/node_modules/@types/node/test.d.ts +0 -783
  83. package/app/node_modules/@types/node/timers/promises.d.ts +0 -93
  84. package/app/node_modules/@types/node/timers.d.ts +0 -101
  85. package/app/node_modules/@types/node/tls.d.ts +0 -1111
  86. package/app/node_modules/@types/node/trace_events.d.ts +0 -171
  87. package/app/node_modules/@types/node/ts4.8/assert/strict.d.ts +0 -8
  88. package/app/node_modules/@types/node/ts4.8/assert.d.ts +0 -961
  89. package/app/node_modules/@types/node/ts4.8/async_hooks.d.ts +0 -518
  90. package/app/node_modules/@types/node/ts4.8/buffer.d.ts +0 -2323
  91. package/app/node_modules/@types/node/ts4.8/child_process.d.ts +0 -1399
  92. package/app/node_modules/@types/node/ts4.8/cluster.d.ts +0 -410
  93. package/app/node_modules/@types/node/ts4.8/console.d.ts +0 -412
  94. package/app/node_modules/@types/node/ts4.8/constants.d.ts +0 -18
  95. package/app/node_modules/@types/node/ts4.8/crypto.d.ts +0 -3972
  96. package/app/node_modules/@types/node/ts4.8/dgram.d.ts +0 -545
  97. package/app/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +0 -192
  98. package/app/node_modules/@types/node/ts4.8/dns/promises.d.ts +0 -370
  99. package/app/node_modules/@types/node/ts4.8/dns.d.ts +0 -660
  100. package/app/node_modules/@types/node/ts4.8/dom-events.d.ts +0 -126
  101. package/app/node_modules/@types/node/ts4.8/domain.d.ts +0 -170
  102. package/app/node_modules/@types/node/ts4.8/events.d.ts +0 -682
  103. package/app/node_modules/@types/node/ts4.8/fs/promises.d.ts +0 -1138
  104. package/app/node_modules/@types/node/ts4.8/fs.d.ts +0 -3875
  105. package/app/node_modules/@types/node/ts4.8/globals.d.ts +0 -302
  106. package/app/node_modules/@types/node/ts4.8/globals.global.d.ts +0 -1
  107. package/app/node_modules/@types/node/ts4.8/http.d.ts +0 -1651
  108. package/app/node_modules/@types/node/ts4.8/http2.d.ts +0 -2133
  109. package/app/node_modules/@types/node/ts4.8/https.d.ts +0 -542
  110. package/app/node_modules/@types/node/ts4.8/index.d.ts +0 -88
  111. package/app/node_modules/@types/node/ts4.8/inspector.d.ts +0 -2741
  112. package/app/node_modules/@types/node/ts4.8/module.d.ts +0 -115
  113. package/app/node_modules/@types/node/ts4.8/net.d.ts +0 -883
  114. package/app/node_modules/@types/node/ts4.8/os.d.ts +0 -473
  115. package/app/node_modules/@types/node/ts4.8/path.d.ts +0 -191
  116. package/app/node_modules/@types/node/ts4.8/perf_hooks.d.ts +0 -625
  117. package/app/node_modules/@types/node/ts4.8/process.d.ts +0 -1488
  118. package/app/node_modules/@types/node/ts4.8/punycode.d.ts +0 -117
  119. package/app/node_modules/@types/node/ts4.8/querystring.d.ts +0 -131
  120. package/app/node_modules/@types/node/ts4.8/readline/promises.d.ts +0 -143
  121. package/app/node_modules/@types/node/ts4.8/readline.d.ts +0 -653
  122. package/app/node_modules/@types/node/ts4.8/repl.d.ts +0 -424
  123. package/app/node_modules/@types/node/ts4.8/stream/consumers.d.ts +0 -12
  124. package/app/node_modules/@types/node/ts4.8/stream/promises.d.ts +0 -42
  125. package/app/node_modules/@types/node/ts4.8/stream/web.d.ts +0 -330
  126. package/app/node_modules/@types/node/ts4.8/stream.d.ts +0 -1440
  127. package/app/node_modules/@types/node/ts4.8/string_decoder.d.ts +0 -67
  128. package/app/node_modules/@types/node/ts4.8/test.d.ts +0 -784
  129. package/app/node_modules/@types/node/ts4.8/timers/promises.d.ts +0 -93
  130. package/app/node_modules/@types/node/ts4.8/timers.d.ts +0 -94
  131. package/app/node_modules/@types/node/ts4.8/tls.d.ts +0 -1111
  132. package/app/node_modules/@types/node/ts4.8/trace_events.d.ts +0 -171
  133. package/app/node_modules/@types/node/ts4.8/tty.d.ts +0 -206
  134. package/app/node_modules/@types/node/ts4.8/url.d.ts +0 -902
  135. package/app/node_modules/@types/node/ts4.8/util.d.ts +0 -2017
  136. package/app/node_modules/@types/node/ts4.8/v8.d.ts +0 -541
  137. package/app/node_modules/@types/node/ts4.8/vm.d.ts +0 -644
  138. package/app/node_modules/@types/node/ts4.8/wasi.d.ts +0 -158
  139. package/app/node_modules/@types/node/ts4.8/worker_threads.d.ts +0 -695
  140. package/app/node_modules/@types/node/ts4.8/zlib.d.ts +0 -517
  141. package/app/node_modules/@types/node/tty.d.ts +0 -206
  142. package/app/node_modules/@types/node/url.d.ts +0 -902
  143. package/app/node_modules/@types/node/util.d.ts +0 -2017
  144. package/app/node_modules/@types/node/v8.d.ts +0 -541
  145. package/app/node_modules/@types/node/vm.d.ts +0 -644
  146. package/app/node_modules/@types/node/wasi.d.ts +0 -158
  147. package/app/node_modules/@types/node/worker_threads.d.ts +0 -695
  148. package/app/node_modules/@types/node/zlib.d.ts +0 -517
  149. package/app/node_modules/@types/qs/LICENSE +0 -21
  150. package/app/node_modules/@types/qs/README.md +0 -16
  151. package/app/node_modules/@types/qs/index.d.ts +0 -62
  152. package/app/node_modules/@types/qs/package.json +0 -65
  153. package/app/node_modules/@types/range-parser/LICENSE +0 -21
  154. package/app/node_modules/@types/range-parser/README.md +0 -55
  155. package/app/node_modules/@types/range-parser/index.d.ts +0 -35
  156. package/app/node_modules/@types/range-parser/package.json +0 -25
  157. package/app/node_modules/@types/send/LICENSE +0 -21
  158. package/app/node_modules/@types/send/README.md +0 -16
  159. package/app/node_modules/@types/send/index.d.ts +0 -231
  160. package/app/node_modules/@types/send/package.json +0 -33
  161. package/app/node_modules/@types/serve-static/LICENSE +0 -21
  162. package/app/node_modules/@types/serve-static/README.md +0 -16
  163. package/app/node_modules/@types/serve-static/index.d.ts +0 -113
  164. package/app/node_modules/@types/serve-static/package.json +0 -38
  165. package/app/node_modules/colors/LICENSE +0 -25
  166. package/app/node_modules/colors/README.md +0 -221
  167. package/app/node_modules/colors/examples/normal-usage.js +0 -82
  168. package/app/node_modules/colors/examples/safe-string.js +0 -79
  169. package/app/node_modules/colors/index.d.ts +0 -136
  170. package/app/node_modules/colors/lib/colors.js +0 -211
  171. package/app/node_modules/colors/lib/custom/trap.js +0 -46
  172. package/app/node_modules/colors/lib/custom/zalgo.js +0 -110
  173. package/app/node_modules/colors/lib/extendStringPrototype.js +0 -110
  174. package/app/node_modules/colors/lib/index.js +0 -13
  175. package/app/node_modules/colors/lib/maps/america.js +0 -10
  176. package/app/node_modules/colors/lib/maps/rainbow.js +0 -12
  177. package/app/node_modules/colors/lib/maps/random.js +0 -11
  178. package/app/node_modules/colors/lib/maps/zebra.js +0 -5
  179. package/app/node_modules/colors/lib/styles.js +0 -95
  180. package/app/node_modules/colors/lib/system/has-flag.js +0 -35
  181. package/app/node_modules/colors/lib/system/supports-colors.js +0 -151
  182. package/app/node_modules/colors/package.json +0 -45
  183. package/app/node_modules/colors/safe.d.ts +0 -48
  184. package/app/node_modules/colors/safe.js +0 -10
  185. package/app/node_modules/colors/themes/generic-logging.js +0 -12
  186. package/app/node_modules/dateformat/LICENSE +0 -20
  187. package/app/node_modules/dateformat/Readme.md +0 -204
  188. package/app/node_modules/dateformat/lib/dateformat.js +0 -1
  189. package/app/node_modules/dateformat/package.json +0 -38
  190. package/app/node_modules/mkdirp/CHANGELOG.md +0 -15
  191. package/app/node_modules/mkdirp/LICENSE +0 -21
  192. package/app/node_modules/mkdirp/bin/cmd.js +0 -68
  193. package/app/node_modules/mkdirp/index.js +0 -31
  194. package/app/node_modules/mkdirp/lib/find-made.js +0 -29
  195. package/app/node_modules/mkdirp/lib/mkdirp-manual.js +0 -64
  196. package/app/node_modules/mkdirp/lib/mkdirp-native.js +0 -39
  197. package/app/node_modules/mkdirp/lib/opts-arg.js +0 -23
  198. package/app/node_modules/mkdirp/lib/path-arg.js +0 -29
  199. package/app/node_modules/mkdirp/lib/use-native.js +0 -10
  200. package/app/node_modules/mkdirp/package.json +0 -44
  201. package/app/node_modules/mkdirp/readme.markdown +0 -266
  202. package/app/node_modules/tinytim/.travis.yml +0 -5
  203. package/app/node_modules/tinytim/README.md +0 -212
  204. package/app/node_modules/tinytim/index.js +0 -1
  205. package/app/node_modules/tinytim/lib/index.js +0 -55
  206. package/app/node_modules/tinytim/lib/tinytim.js +0 -50
  207. package/app/node_modules/tinytim/package.json +0 -24
  208. package/app/node_modules/tinytim/test/files/html.tim +0 -1
  209. package/app/node_modules/tinytim/test/files/string.tim +0 -1
  210. package/app/node_modules/tinytim/test/files/string2.tim +0 -1
  211. package/app/node_modules/tinytim/test/render-file-replace.js +0 -39
  212. package/app/node_modules/tinytim/test/render-replace.js +0 -94
  213. package/app/node_modules/tinytim/test/tim-replace.js +0 -95
  214. package/app/node_modules/tracer/README.md +0 -747
  215. package/app/node_modules/tracer/lib/color_console.js +0 -15
  216. package/app/node_modules/tracer/lib/console.js +0 -165
  217. package/app/node_modules/tracer/lib/dailyfile.js +0 -92
  218. package/app/node_modules/tracer/lib/index.js +0 -10
  219. package/app/node_modules/tracer/lib/settings.js +0 -25
  220. package/app/node_modules/tracer/lib/utils.js +0 -58
  221. package/app/node_modules/tracer/package.json +0 -53
  222. package/app/node_modules/tracer/types/index.d.ts +0 -189
  223. package/dist/scaffold/templates/front-page.class.ts.tpl +0 -12
  224. package/dist/scaffold/templates/main.ts.tpl +0 -13
  225. package/dist/scaffold/templates/nodemon.json.tpl +0 -7
  226. package/dist/scaffold/templates/package.json.tpl +0 -16
  227. package/dist/scaffold/templates/tsconfig.json.tpl +0 -20
  228. /package/dist/{core.decorator.js → src/core.decorator.js} +0 -0
  229. /package/dist/{default → src/default}/default-authentication.class.js +0 -0
  230. /package/dist/{default → src/default}/express-server.class.js +0 -0
  231. /package/dist/{default → src/default}/log-default.class.js +0 -0
  232. /package/dist/{default → src/default}/node-cache.class.js +0 -0
  233. /package/dist/{default → src/default}/pages/404.html +0 -0
  234. /package/dist/{default → src/default}/pages/500.html +0 -0
  235. /package/dist/{default → src/default}/rabbitmq.class.js +0 -0
  236. /package/dist/{default → src/default}/read-write-db.class.js +0 -0
  237. /package/dist/{default → src/default}/redis.class.js +0 -0
  238. /package/dist/{default → src/default}/socket-io.class.js +0 -0
  239. /package/dist/{factory → src/factory}/authentication-factory.class.js +0 -0
  240. /package/dist/{factory → src/factory}/cache-factory.class.js +0 -0
  241. /package/dist/{factory → src/factory}/data-source-factory.class.js +0 -0
  242. /package/dist/{factory → src/factory}/log-factory.class.js +0 -0
  243. /package/dist/{factory → src/factory}/server-factory.class.js +0 -0
  244. /package/dist/{route.decorator.js → src/route.decorator.js} +0 -0
  245. /package/dist/{scaffold → src/scaffold}/command.js +0 -0
  246. /package/dist/{typespeed.js → src/typespeed.js} +0 -0
@@ -1,221 +0,0 @@
1
- # colors.js
2
- [![Build Status](https://travis-ci.org/Marak/colors.js.svg?branch=master)](https://travis-ci.org/Marak/colors.js)
3
- [![version](https://img.shields.io/npm/v/colors.svg)](https://www.npmjs.org/package/colors)
4
- [![dependencies](https://david-dm.org/Marak/colors.js.svg)](https://david-dm.org/Marak/colors.js)
5
- [![devDependencies](https://david-dm.org/Marak/colors.js/dev-status.svg)](https://david-dm.org/Marak/colors.js#info=devDependencies)
6
-
7
- Please check out the [roadmap](ROADMAP.md) for upcoming features and releases. Please open Issues to provide feedback, and check the `develop` branch for the latest bleeding-edge updates.
8
-
9
- ## get color and style in your node.js console
10
-
11
- ![Demo](https://raw.githubusercontent.com/Marak/colors.js/master/screenshots/colors.png)
12
-
13
- ## Installation
14
-
15
- npm install colors
16
-
17
- ## colors and styles!
18
-
19
- ### text colors
20
-
21
- - black
22
- - red
23
- - green
24
- - yellow
25
- - blue
26
- - magenta
27
- - cyan
28
- - white
29
- - gray
30
- - grey
31
-
32
- ### bright text colors
33
-
34
- - brightRed
35
- - brightGreen
36
- - brightYellow
37
- - brightBlue
38
- - brightMagenta
39
- - brightCyan
40
- - brightWhite
41
-
42
- ### background colors
43
-
44
- - bgBlack
45
- - bgRed
46
- - bgGreen
47
- - bgYellow
48
- - bgBlue
49
- - bgMagenta
50
- - bgCyan
51
- - bgWhite
52
- - bgGray
53
- - bgGrey
54
-
55
- ### bright background colors
56
-
57
- - bgBrightRed
58
- - bgBrightGreen
59
- - bgBrightYellow
60
- - bgBrightBlue
61
- - bgBrightMagenta
62
- - bgBrightCyan
63
- - bgBrightWhite
64
-
65
- ### styles
66
-
67
- - reset
68
- - bold
69
- - dim
70
- - italic
71
- - underline
72
- - inverse
73
- - hidden
74
- - strikethrough
75
-
76
- ### extras
77
-
78
- - rainbow
79
- - zebra
80
- - america
81
- - trap
82
- - random
83
-
84
-
85
- ## Usage
86
-
87
- By popular demand, `colors` now ships with two types of usages!
88
-
89
- The super nifty way
90
-
91
- ```js
92
- var colors = require('colors');
93
-
94
- console.log('hello'.green); // outputs green text
95
- console.log('i like cake and pies'.underline.red) // outputs red underlined text
96
- console.log('inverse the color'.inverse); // inverses the color
97
- console.log('OMG Rainbows!'.rainbow); // rainbow
98
- console.log('Run the trap'.trap); // Drops the bass
99
-
100
- ```
101
-
102
- or a slightly less nifty way which doesn't extend `String.prototype`
103
-
104
- ```js
105
- var colors = require('colors/safe');
106
-
107
- console.log(colors.green('hello')); // outputs green text
108
- console.log(colors.red.underline('i like cake and pies')) // outputs red underlined text
109
- console.log(colors.inverse('inverse the color')); // inverses the color
110
- console.log(colors.rainbow('OMG Rainbows!')); // rainbow
111
- console.log(colors.trap('Run the trap')); // Drops the bass
112
-
113
- ```
114
-
115
- I prefer the first way. Some people seem to be afraid of extending `String.prototype` and prefer the second way.
116
-
117
- If you are writing good code you will never have an issue with the first approach. If you really don't want to touch `String.prototype`, the second usage will not touch `String` native object.
118
-
119
- ## Enabling/Disabling Colors
120
-
121
- The package will auto-detect whether your terminal can use colors and enable/disable accordingly. When colors are disabled, the color functions do nothing. You can override this with a command-line flag:
122
-
123
- ```bash
124
- node myapp.js --no-color
125
- node myapp.js --color=false
126
-
127
- node myapp.js --color
128
- node myapp.js --color=true
129
- node myapp.js --color=always
130
-
131
- FORCE_COLOR=1 node myapp.js
132
- ```
133
-
134
- Or in code:
135
-
136
- ```javascript
137
- var colors = require('colors');
138
- colors.enable();
139
- colors.disable();
140
- ```
141
-
142
- ## Console.log [string substitution](http://nodejs.org/docs/latest/api/console.html#console_console_log_data)
143
-
144
- ```js
145
- var name = 'Marak';
146
- console.log(colors.green('Hello %s'), name);
147
- // outputs -> 'Hello Marak'
148
- ```
149
-
150
- ## Custom themes
151
-
152
- ### Using standard API
153
-
154
- ```js
155
-
156
- var colors = require('colors');
157
-
158
- colors.setTheme({
159
- silly: 'rainbow',
160
- input: 'grey',
161
- verbose: 'cyan',
162
- prompt: 'grey',
163
- info: 'green',
164
- data: 'grey',
165
- help: 'cyan',
166
- warn: 'yellow',
167
- debug: 'blue',
168
- error: 'red'
169
- });
170
-
171
- // outputs red text
172
- console.log("this is an error".error);
173
-
174
- // outputs yellow text
175
- console.log("this is a warning".warn);
176
- ```
177
-
178
- ### Using string safe API
179
-
180
- ```js
181
- var colors = require('colors/safe');
182
-
183
- // set single property
184
- var error = colors.red;
185
- error('this is red');
186
-
187
- // set theme
188
- colors.setTheme({
189
- silly: 'rainbow',
190
- input: 'grey',
191
- verbose: 'cyan',
192
- prompt: 'grey',
193
- info: 'green',
194
- data: 'grey',
195
- help: 'cyan',
196
- warn: 'yellow',
197
- debug: 'blue',
198
- error: 'red'
199
- });
200
-
201
- // outputs red text
202
- console.log(colors.error("this is an error"));
203
-
204
- // outputs yellow text
205
- console.log(colors.warn("this is a warning"));
206
-
207
- ```
208
-
209
- ### Combining Colors
210
-
211
- ```javascript
212
- var colors = require('colors');
213
-
214
- colors.setTheme({
215
- custom: ['red', 'underline']
216
- });
217
-
218
- console.log('test'.custom);
219
- ```
220
-
221
- *Protip: There is a secret undocumented style in `colors`. If you find the style you can summon him.*
@@ -1,82 +0,0 @@
1
- var colors = require('../lib/index');
2
-
3
- console.log('First some yellow text'.yellow);
4
-
5
- console.log('Underline that text'.yellow.underline);
6
-
7
- console.log('Make it bold and red'.red.bold);
8
-
9
- console.log(('Double Raindows All Day Long').rainbow);
10
-
11
- console.log('Drop the bass'.trap);
12
-
13
- console.log('DROP THE RAINBOW BASS'.trap.rainbow);
14
-
15
- // styles not widely supported
16
- console.log('Chains are also cool.'.bold.italic.underline.red);
17
-
18
- // styles not widely supported
19
- console.log('So '.green + 'are'.underline + ' ' + 'inverse'.inverse
20
- + ' styles! '.yellow.bold);
21
- console.log('Zebras are so fun!'.zebra);
22
-
23
- //
24
- // Remark: .strikethrough may not work with Mac OS Terminal App
25
- //
26
- console.log('This is ' + 'not'.strikethrough + ' fun.');
27
-
28
- console.log('Background color attack!'.black.bgWhite);
29
- console.log('Use random styles on everything!'.random);
30
- console.log('America, Heck Yeah!'.america);
31
-
32
- console.log('Blindingly '.brightCyan + 'bright? '.brightRed + 'Why '.brightYellow + 'not?!'.brightGreen);
33
-
34
- console.log('Setting themes is useful');
35
-
36
- //
37
- // Custom themes
38
- //
39
- console.log('Generic logging theme as JSON'.green.bold.underline);
40
- // Load theme with JSON literal
41
- colors.setTheme({
42
- silly: 'rainbow',
43
- input: 'grey',
44
- verbose: 'cyan',
45
- prompt: 'grey',
46
- info: 'green',
47
- data: 'grey',
48
- help: 'cyan',
49
- warn: 'yellow',
50
- debug: 'blue',
51
- error: 'red',
52
- });
53
-
54
- // outputs red text
55
- console.log('this is an error'.error);
56
-
57
- // outputs yellow text
58
- console.log('this is a warning'.warn);
59
-
60
- // outputs grey text
61
- console.log('this is an input'.input);
62
-
63
- console.log('Generic logging theme as file'.green.bold.underline);
64
-
65
- // Load a theme from file
66
- try {
67
- colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));
68
- } catch (err) {
69
- console.log(err);
70
- }
71
-
72
- // outputs red text
73
- console.log('this is an error'.error);
74
-
75
- // outputs yellow text
76
- console.log('this is a warning'.warn);
77
-
78
- // outputs grey text
79
- console.log('this is an input'.input);
80
-
81
- // console.log("Don't summon".zalgo)
82
-
@@ -1,79 +0,0 @@
1
- var colors = require('../safe');
2
-
3
- console.log(colors.yellow('First some yellow text'));
4
-
5
- console.log(colors.yellow.underline('Underline that text'));
6
-
7
- console.log(colors.red.bold('Make it bold and red'));
8
-
9
- console.log(colors.rainbow('Double Raindows All Day Long'));
10
-
11
- console.log(colors.trap('Drop the bass'));
12
-
13
- console.log(colors.rainbow(colors.trap('DROP THE RAINBOW BASS')));
14
-
15
- // styles not widely supported
16
- console.log(colors.bold.italic.underline.red('Chains are also cool.'));
17
-
18
- // styles not widely supported
19
- console.log(colors.green('So ') + colors.underline('are') + ' '
20
- + colors.inverse('inverse') + colors.yellow.bold(' styles! '));
21
-
22
- console.log(colors.zebra('Zebras are so fun!'));
23
-
24
- console.log('This is ' + colors.strikethrough('not') + ' fun.');
25
-
26
-
27
- console.log(colors.black.bgWhite('Background color attack!'));
28
- console.log(colors.random('Use random styles on everything!'));
29
- console.log(colors.america('America, Heck Yeah!'));
30
-
31
- console.log(colors.brightCyan('Blindingly ') + colors.brightRed('bright? ') + colors.brightYellow('Why ') + colors.brightGreen('not?!'));
32
-
33
- console.log('Setting themes is useful');
34
-
35
- //
36
- // Custom themes
37
- //
38
- // console.log('Generic logging theme as JSON'.green.bold.underline);
39
- // Load theme with JSON literal
40
- colors.setTheme({
41
- silly: 'rainbow',
42
- input: 'blue',
43
- verbose: 'cyan',
44
- prompt: 'grey',
45
- info: 'green',
46
- data: 'grey',
47
- help: 'cyan',
48
- warn: 'yellow',
49
- debug: 'blue',
50
- error: 'red',
51
- });
52
-
53
- // outputs red text
54
- console.log(colors.error('this is an error'));
55
-
56
- // outputs yellow text
57
- console.log(colors.warn('this is a warning'));
58
-
59
- // outputs blue text
60
- console.log(colors.input('this is an input'));
61
-
62
-
63
- // console.log('Generic logging theme as file'.green.bold.underline);
64
-
65
- // Load a theme from file
66
- colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));
67
-
68
- // outputs red text
69
- console.log(colors.error('this is an error'));
70
-
71
- // outputs yellow text
72
- console.log(colors.warn('this is a warning'));
73
-
74
- // outputs grey text
75
- console.log(colors.input('this is an input'));
76
-
77
- // console.log(colors.zalgo("Don't summon him"))
78
-
79
-
@@ -1,136 +0,0 @@
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 interface Color {
7
- (text: string): string;
8
-
9
- strip: Color;
10
- stripColors: Color;
11
-
12
- black: Color;
13
- red: Color;
14
- green: Color;
15
- yellow: Color;
16
- blue: Color;
17
- magenta: Color;
18
- cyan: Color;
19
- white: Color;
20
- gray: Color;
21
- grey: Color;
22
-
23
- bgBlack: Color;
24
- bgRed: Color;
25
- bgGreen: Color;
26
- bgYellow: Color;
27
- bgBlue: Color;
28
- bgMagenta: Color;
29
- bgCyan: Color;
30
- bgWhite: Color;
31
-
32
- reset: Color;
33
- bold: Color;
34
- dim: Color;
35
- italic: Color;
36
- underline: Color;
37
- inverse: Color;
38
- hidden: Color;
39
- strikethrough: Color;
40
-
41
- rainbow: Color;
42
- zebra: Color;
43
- america: Color;
44
- trap: Color;
45
- random: Color;
46
- zalgo: Color;
47
- }
48
-
49
- export function enable(): void;
50
- export function disable(): void;
51
- export function setTheme(theme: any): void;
52
-
53
- export let enabled: boolean;
54
-
55
- export const strip: Color;
56
- export const stripColors: Color;
57
-
58
- export const black: Color;
59
- export const red: Color;
60
- export const green: Color;
61
- export const yellow: Color;
62
- export const blue: Color;
63
- export const magenta: Color;
64
- export const cyan: Color;
65
- export const white: Color;
66
- export const gray: Color;
67
- export const grey: Color;
68
-
69
- export const bgBlack: Color;
70
- export const bgRed: Color;
71
- export const bgGreen: Color;
72
- export const bgYellow: Color;
73
- export const bgBlue: Color;
74
- export const bgMagenta: Color;
75
- export const bgCyan: Color;
76
- export const bgWhite: Color;
77
-
78
- export const reset: Color;
79
- export const bold: Color;
80
- export const dim: Color;
81
- export const italic: Color;
82
- export const underline: Color;
83
- export const inverse: Color;
84
- export const hidden: Color;
85
- export const strikethrough: Color;
86
-
87
- export const rainbow: Color;
88
- export const zebra: Color;
89
- export const america: Color;
90
- export const trap: Color;
91
- export const random: Color;
92
- export const zalgo: Color;
93
-
94
- declare global {
95
- interface String {
96
- strip: string;
97
- stripColors: string;
98
-
99
- black: string;
100
- red: string;
101
- green: string;
102
- yellow: string;
103
- blue: string;
104
- magenta: string;
105
- cyan: string;
106
- white: string;
107
- gray: string;
108
- grey: string;
109
-
110
- bgBlack: string;
111
- bgRed: string;
112
- bgGreen: string;
113
- bgYellow: string;
114
- bgBlue: string;
115
- bgMagenta: string;
116
- bgCyan: string;
117
- bgWhite: string;
118
-
119
- reset: string;
120
- // @ts-ignore
121
- bold: string;
122
- dim: string;
123
- italic: string;
124
- underline: string;
125
- inverse: string;
126
- hidden: string;
127
- strikethrough: string;
128
-
129
- rainbow: string;
130
- zebra: string;
131
- america: string;
132
- trap: string;
133
- random: string;
134
- zalgo: string;
135
- }
136
- }