微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

colors.js

编程之家收集整理的这个编程导航主要介绍了colors.js编程之家,现在分享给大家,也给大家做个参考。

colors.js 介绍

colors.js是Nodejs终端着色colors插件

colors.js安装

npm install colors

colors.js使用 

var colors = require('colors');

console.log('hello'.green); // outputs green text

console.log('i like cake and pies'.underline.red) // outputs red underlined text

console.log('inverse the color'.inverse); // inverses the color

console.log('OMG Rainbows!'.rainbow); // rainbow

console.log('Run the trap'.trap); // Drops the bass

var colors = require('colors/safe');

console.log(colors.green('hello')); // outputs green text

console.log(colors.red.underline('i like cake and pies')) // outputs red underlined text

console.log(colors.inverse('inverse the color')); // inverses the color

console.log(colors.rainbow('OMG Rainbows!')); // rainbow

console.log(colors.trap('Run the trap')); // Drops the bass

网站地址:https://github.com/Marak/colors.js

GitHub:https://github.com/Marak/colors.js

网站描述:一款基于node.js console命令行参数神器

colors.js

官方网站:https://github.com/Marak/colors.js

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。