chomens-bot-js/util/colors/minecraft.js

24 lines
428 B
JavaScript
Raw Permalink Normal View History

2022-08-14 05:51:45 -04:00
const styles = {
bigint: '\xa76',
boolean: '\xa76',
date: '\xa75',
module: '\xa7n',
name: undefined,
null: '\xa7l',
number: '\xa76',
regexp: '\xa74',
special: '\xa73',
string: '\xa72',
symbol: '\xa72',
2022-11-27 02:35:28 -05:00
undefined: '\xa78'
}
2022-08-14 05:51:45 -04:00
2022-11-27 02:35:28 -05:00
function stylize (str, styleType) {
const style = styles[styleType]
if (style !== undefined) return `${style}${str}\xa7r`
return str
2022-08-14 05:51:45 -04:00
}
2022-11-27 02:35:28 -05:00
module.exports = { stylize, styles }