Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

colorful

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

colorful - npm Package Compare versions

Comparing version 2.0.3 to 2.1.0

13

index.js

@@ -17,4 +17,17 @@ exports = module.exports = require('./lib/ansi');

exports.toxic = function() {
// poison the String prototype
var colors = exports.color;
Object.keys(colors).forEach(function(key) {
var fn = colors[key];
Object.defineProperty(String.prototype, key, {
get: function() {
return fn(this.valueOf());
}
});
});
};
Object.defineProperty(exports, 'isSupported', {
get: exports.isColorSupported
});

3

lib/ansi.js

@@ -11,3 +11,2 @@

var tty = require('tty');
var os = require('os');

@@ -25,3 +24,3 @@ exports.disabled = false;

// windows will support color
if (os.type() === 'Windows_NT') return true;
if (process.platform === 'win32') return true;

@@ -28,0 +27,0 @@ var term = process.env.TERM;

{
"name": "colorful",
"version": "2.0.3",
"version": "2.1.0",
"description": "colorful if a terminal tool for colors",

@@ -5,0 +5,0 @@ "keywords": [

@@ -66,2 +66,14 @@ # Colorful

## Toxic
Let's posion the string object, just like colors does.
```javascript
require('colorful').toxic()
'hello'.bold
'hello'.red
```
## Detective

@@ -112,2 +124,6 @@

**2013-05-22** `2.1.0`
Add toxic API.
**2013-03-22** `2.0.2`

@@ -114,0 +130,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc