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.
 

12 lines
246 B

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)}]`)
)
}