mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-12-18 03:12:23 -05:00
24 lines
465 B
JavaScript
24 lines
465 B
JavaScript
|
/* eslint-disable require-jsdoc */
|
||
|
const styles = {
|
||
|
bigint: '\xa76',
|
||
|
boolean: '\xa76',
|
||
|
date: '\xa75',
|
||
|
module: '\xa7n',
|
||
|
name: undefined,
|
||
|
null: '\xa7l',
|
||
|
number: '\xa76',
|
||
|
regexp: '\xa74',
|
||
|
special: '\xa73',
|
||
|
string: '\xa72',
|
||
|
symbol: '\xa72',
|
||
|
undefined: '\xa78',
|
||
|
};
|
||
|
|
||
|
function stylize(str, styleType) {
|
||
|
const style = styles[styleType];
|
||
|
if (style !== undefined) return `${style}${str}\xa7r`;
|
||
|
return str;
|
||
|
}
|
||
|
|
||
|
module.exports = {stylize, styles};
|