make-deno-edition
Version:
Automatically makes package.json projects (such as npm packages and node.js modules) compatible with Deno.
23 lines (22 loc) • 618 B
JavaScript
import chalk from 'chalk';
import { inspect as utilInspect } from 'util';
export function inspect(a) {
if (typeof a === 'string')
return a;
else if (a instanceof Set)
return Array.from(a).map((i) => inspect(i));
else
return utilInspect(a, { colors: true, depth: 5 });
}
export function special(...m) {
return chalk.bold.underline.magenta(...m);
}
export function warn(...m) {
return chalk.bold.underline.yellow(...m);
}
export function error(...m) {
return chalk.bold.underline.red(...m);
}
export function success(...m) {
return chalk.bold.underline.green(...m);
}