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

magicpen

Package Overview
Dependencies
Maintainers
2
Versions
93
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

magicpen - npm Package Compare versions

Comparing version 0.5.1 to 0.5.2

images/Color sample - ansi-256.png

2

lib/HtmlSerializer.js

@@ -47,3 +47,3 @@ var shim = require('./shim');

return map(lines, function (line) {
return ' <div>' + this.serializeLine(line).join('') + '</div>';
return ' <div>' + (this.serializeLine(line).join('') || '&nbsp;') + '</div>';
}, this).join('\n');

@@ -50,0 +50,0 @@ };

@@ -203,3 +203,3 @@ /*!

return map(lines, function (line) {
return ' <div>' + this.serializeLine(line).join('') + '</div>';
return ' <div>' + (this.serializeLine(line).join('') || '&nbsp;') + '</div>';
}, this).join('\n');

@@ -1049,3 +1049,3 @@ };

else if((h2p-h1p) < -180) return (h2p-h1p)+360;
else throw(error);
else throw(new Error());
}

@@ -1066,3 +1066,3 @@ var dhp = dhp_f(C1,C2, h1p, h2p); //(10)

else if((abs(h1p-h2p) > 180) && ((h1p+h2p) >= 360)) return (h1p+h2p-360)/2.0;
else throw(error);
else throw(new Error());
}

@@ -1187,3 +1187,3 @@ var a_hp = a_hp_f(C1,C2,h1p,h2p); //(14)

{
var color2 = b[idx2]
var color2 = b[idx2];
var current_color_diff = diff(color1,color2);

@@ -1190,0 +1190,0 @@ if((best_color == undefined) || (current_color_diff < best_color_diff))

{
"name": "magicpen",
"version": "0.5.1",
"version": "0.5.2",
"description": "Styled output in both consoles and browsers",

@@ -5,0 +5,0 @@ "main": "./lib/MagicPen.js",

@@ -165,2 +165,10 @@ # MagicPen

When you use hex colors in the terminal the colors will be
approximated to the palette in use. The below images shows a limited
color sample in html and in a terminal supporting 256 colors.
![Color sample html](images/Color sample - html.png)
![Color sample ansi-256](images/Color sample - ansi-256.png)
### toString(format = 'text')

@@ -167,0 +175,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