New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ikonograph

Package Overview
Dependencies
Maintainers
7
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ikonograph - npm Package Compare versions

Comparing version 4.0.2 to 4.0.3

5

CHANGELOG.md

@@ -1,3 +0,3 @@

<a name="4.0.2"></a>
## [4.0.2](https://github.com/contactlab/ikonograph/compare/v3.1.0...v4.0.2) (2017-08-08)
<a name="4.0.3"></a>
## [4.0.3](https://github.com/contactlab/ikonograph/compare/v3.1.0...v4.0.3) (2017-08-16)

@@ -8,2 +8,3 @@

* better management of icon non existent or not specified ([#35](https://github.com/contactlab/ikonograph/issues/35)) ([b191df6](https://github.com/contactlab/ikonograph/commit/b191df6))
* Fix throw error blocking parse ([d26c3b6](https://github.com/contactlab/ikonograph/commit/d26c3b6))
* fixed broken behaviour for style attribute ([#40](https://github.com/contactlab/ikonograph/issues/40)) ([c72a24b](https://github.com/contactlab/ikonograph/commit/c72a24b))

@@ -10,0 +11,0 @@

2

package.json
{
"name": "ikonograph",
"version": "4.0.2",
"version": "4.0.3",
"description": "Icons library by Contactlab",

@@ -5,0 +5,0 @@ "main": "./dist/ikonograph.min.css",

@@ -6,2 +6,3 @@ const ICONS_SVG = {

const MIME_TYPE = 'image/svg+xml';
const ICON_DEFAULT = 'agenda';
const ICON_ATTR = 'icon';

@@ -40,6 +41,2 @@ const SIZE_ATTR = 'size';

if (!iconName) {
this._setIcon(iconName);
}
this._addStyleChild(size, color);

@@ -116,8 +113,8 @@ }

_addSVGChild(icon) {
const svgIconString = ICONS_SVG[icon];
if (!svgIconString) {
throw new Error('The specified icon does not exist');
if (!ICONS_SVG[icon]) {
console.warn('Ikonograph: The specified icon does not exist');
}
const svgElement = new DOMParser().parseFromString(ICONS_SVG[icon], MIME_TYPE);
const currentIcon = ICONS_SVG[icon] || ICONS_SVG[ICON_DEFAULT];
const svgElement = new DOMParser().parseFromString(currentIcon, MIME_TYPE);
svgElement.documentElement.removeAttribute('width');

@@ -124,0 +121,0 @@ svgElement.documentElement.removeAttribute('height');

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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