Extract the log function

master
Frédéric Matte 2024-10-11 13:08:41 -04:00
parent f60f1b34e9
commit a71feba251
4 changed files with 8 additions and 6 deletions

5
lib/log.js Normal file
View File

@ -0,0 +1,5 @@
const log = (...args) => {
process.stdout.write(...args)
}
export { log }

View File

@ -1,6 +1,5 @@
import chalk from 'chalk'
const log = (...args) => process.stdout.write(...args)
import { log } from '../lib/log.js'
const errorreporter = () => {
const report = {

View File

@ -1,7 +1,6 @@
import chalk from 'chalk'
import { stackParser } from '../lib/stackparser.js'
const log = (...args) => console.log(...args)
import { log } from '../lib/log.js'
const linereporter = () => {
const lines = []

View File

@ -1,6 +1,5 @@
import chalk from 'chalk'
const log = (...args) => process.stdout.write(...args)
import { log } from '../lib/log.js'
const summaryreporter = () => {