mirror of
https://github.com/filiprojek/nork.git
synced 2025-02-20 01:22:58 +01:00
rewriting to oop and typescript
This commit is contained in:
16
src/global.ts
Normal file
16
src/global.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import colors from 'colors'
|
||||
|
||||
export default class Global {
|
||||
static logSuccess = (msg: boolean | string = false): string => {
|
||||
if (!msg) {
|
||||
msg = 'Success!'
|
||||
}
|
||||
console.log(colors.cyan(String(msg)))
|
||||
return String(msg)
|
||||
}
|
||||
|
||||
static logError(errorMsg: string) {
|
||||
console.log(colors.bgYellow.red(errorMsg))
|
||||
return
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user