UNPKG

poku

Version:

🐷 Poku makes testing easy for Node.js, Bun, Deno, and you at the same time.

17 lines (16 loc) 648 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.log = void 0; const assert_js_1 = require("../../parsers/assert.js"); const write_js_1 = require("../../services/write.js"); /** By default **Poku** only shows outputs generated from itself. This helper allows you to use an alternative to `console.log` with **Poku**. */ const log = (...args) => { const parsedMessages = args .map((arg) => (0, assert_js_1.parseResultType)(arg)) .join(' ') .split('\n') .map((line) => `\x1b[0m${line}\x1b[0m`) .join('\n'); (0, write_js_1.log)(parsedMessages); }; exports.log = log;