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 5.6.0 to 5.7.0

9

lib/MagicPen.js

@@ -148,4 +148,9 @@ /*global window*/

MagicPen.prototype.addStyle = function (style, handler, allowRedefinition) {
if (this[style] && !allowRedefinition) {
throw new Error('"' + style + '" style is already defined, set 3rd arg (allowRedefinition) to true to define it anyway');
var existingType = typeof this[style];
if (existingType === 'function') {
if (!allowRedefinition) {
throw new Error('"' + style + '" style is already defined, set 3rd arg (allowRedefinition) to true to define it anyway');
}
} else if (existingType !== 'undefined') {
throw new Error('"' + style + '" style cannot be defined, it clashes with a built-in attribute');
}

@@ -152,0 +157,0 @@

@@ -488,4 +488,9 @@ /*!

MagicPen.prototype.addStyle = function (style, handler, allowRedefinition) {
if (this[style] && !allowRedefinition) {
throw new Error('"' + style + '" style is already defined, set 3rd arg (allowRedefinition) to true to define it anyway');
var existingType = typeof this[style];
if (existingType === 'function') {
if (!allowRedefinition) {
throw new Error('"' + style + '" style is already defined, set 3rd arg (allowRedefinition) to true to define it anyway');
}
} else if (existingType !== 'undefined') {
throw new Error('"' + style + '" style cannot be defined, it clashes with a built-in attribute');
}

@@ -492,0 +497,0 @@

{
"name": "magicpen",
"version": "5.6.0",
"version": "5.7.0",
"description": "Styled output in both consoles and browsers",

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

Sorry, the diff of this file is too big to display

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