node-tinycolor-0.0.1~aca92ed/0000755000175000017500000000000012046273602014442 5ustar mikemikenode-tinycolor-0.0.1~aca92ed/tinycolor.js0000644000175000017500000000237612046273602017032 0ustar mikemikevar tty = require('tty'); var styles = { 'bold': ['\033[1m', '\033[22m'], 'italic': ['\033[3m', '\033[23m'], 'underline': ['\033[4m', '\033[24m'], 'inverse': ['\033[7m', '\033[27m'], 'black': ['\033[30m', '\033[39m'], 'red': ['\033[31m', '\033[39m'], 'green': ['\033[32m', '\033[39m'], 'yellow': ['\033[33m', '\033[39m'], 'blue': ['\033[34m', '\033[39m'], 'magenta': ['\033[35m', '\033[39m'], 'cyan': ['\033[36m', '\033[39m'], 'white': ['\033[37m', '\033[39m'], 'default': ['\033[39m', '\033[39m'], 'grey': ['\033[90m', '\033[39m'], 'bgBlack': ['\033[40m', '\033[49m'], 'bgRed': ['\033[41m', '\033[49m'], 'bgGreen': ['\033[42m', '\033[49m'], 'bgYellow': ['\033[43m', '\033[49m'], 'bgBlue': ['\033[44m', '\033[49m'], 'bgMagenta': ['\033[45m', '\033[49m'], 'bgCyan': ['\033[46m', '\033[49m'], 'bgWhite': ['\033[47m', '\033[49m'], 'bgDefault': ['\033[49m', '\033[49m'] } var enabled = !process.env.NOCOLOR && tty.isatty(1) && tty.isatty(2); Object.keys(styles).forEach(function(style) { Object.defineProperty(String.prototype, style, { get: function() { return (enabled ? styles[style][0] + this + styles[style][1] : this); }, enumerable: false }); }); node-tinycolor-0.0.1~aca92ed/example.js0000644000175000017500000000023312046273602016431 0ustar mikemikerequire('./tinycolor'); console.log('this should be red and have an underline!'.grey.underline); console.log('this should have a blue background!'.bgBlue);node-tinycolor-0.0.1~aca92ed/package.json0000644000175000017500000000057512046273602016737 0ustar mikemike{ "author": "Einar Otto Stangvik (http://2x.io)", "name": "tinycolor", "description": "a to-the-point color module for node", "version": "0.0.1", "repository": { "type": "git", "url": "git://github.com/einaros/tinycolor.git" }, "engines": { "node": ">=0.4.0" }, "dependencies": {}, "devDependencies": {}, "main": "tinycolor" } node-tinycolor-0.0.1~aca92ed/README.md0000644000175000017500000000243512046273602015725 0ustar mikemike# tinycolor This is a no-fuzz, barebone, zero muppetry color module for node.js. # Environment variables * The module respects the `NOCOLOR` environment variable if you wish to disable the coloring. # License MIT License Copyright (c) 2012 Einar Otto Stangvik All Rights Reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. node-tinycolor-0.0.1~aca92ed/.gitignore0000644000175000017500000000006112046273602016427 0ustar mikemikenpm-debug.log node_modules .*.swp .lock-* build/