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

react-inlinesvg

Package Overview
Dependencies
Maintainers
2
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-inlinesvg - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

10

lib/index.js

@@ -217,3 +217,11 @@ var InlineSVGError, PropTypes, React, Status, configurationError, createError, delay, getHash, http, httpplease, ieXDomain, isSupportedEnvironment, me, once, span, supportsInlineSVG, uniquifyIDs, unsupportedBrowserError,

load: function() {
return http.get(this.props.src, this.handleLoad);
var m, text;
if (m = this.props.src.match(/data:image\/svg[^,]*?(;base64)?,(.*)/)) {
text = m[1] ? atob(m[2]) : decodeURIComponent(m[2]);
return this.handleLoad(null, {
text: text
});
} else {
return http.get(this.props.src, this.handleLoad);
}
},

@@ -220,0 +228,0 @@ getClassName: function() {

2

package.json
{
"name": "react-inlinesvg",
"version": "0.3.0",
"version": "0.4.0",
"description": "An SVG loader for React",

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

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