chalk#blue TypeScript Examples
The following examples show how to use
chalk#blue.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: packet.ts From hoprnet with GNU General Public License v3.0 | 6 votes |
async storeUnacknowledgedTicket(db: HoprDB) {
if (this.ownKey == undefined) {
throw Error(`Invalid state`)
}
const unacknowledged = new UnacknowledgedTicket(this.ticket, this.ownKey, this.previousHop)
log(
`Storing unacknowledged ticket. Expecting to receive a preImage for ${green(
this.ackChallenge.toHex()
)} from ${blue(pubKeyToPeerId(this.nextHop).toB58String())}`
)
await db.storePendingAcknowledgement(this.ackChallenge, false, unacknowledged)
}
Example #2
Source File: logger.ts From yfm-docs with MIT License | 6 votes |
logger = {
info: function (pathToFile: string, extraMessage?: string) {
writeLog(`${grey('INFO')} ${extraMessage} ${pathToFile}`);
},
proc: function (pathToFile: string) {
writeLog(`${blue('PROC')} Processing file ${pathToFile}`);
},
copy: function (pathToFile: string) {
writeLog(`${green('COPY')} Copying file ${pathToFile}`);
},
upload: function (pathToFile: string) {
writeLog(`${green('UPLOAD')} Uploading file ${pathToFile}`);
},
}