You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
246 B
13 lines
246 B
8 years ago
|
const ms = require('ms')
|
||
|
const chalk = require('chalk')
|
||
|
|
||
|
// returns a time delta with the right color
|
||
|
// example: `[103ms]`
|
||
|
|
||
|
module.exports = () => {
|
||
|
const start = new Date()
|
||
|
return () => (
|
||
|
chalk.gray(`[${ms(new Date() - start)}]`)
|
||
|
)
|
||
|
}
|