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

babel-plugin-react-inline-svg-unique-id

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-react-inline-svg-unique-id - npm Package Compare versions

Comparing version 1.2.2 to 1.3.0

16

lib/plugin.js

@@ -80,2 +80,7 @@ "use strict";

var isXlinkHrefAttribute = function isXlinkHrefAttribute(attribute) {
var nameNode = attribute.get('name');
return nameNode.isJSXNamespacedName() && nameNode.node.namespace.name === 'xlink' && nameNode.node.name.name === 'href';
};
var createIdValuesContainer = function createIdValuesContainer(_createIdIdentifier) {

@@ -236,3 +241,3 @@ var idIdentifierByIdValueMap = new Map();

path.get('attributes').forEach(function (attribute) {
return updateAttributeIdReference({
updateAttributeIdReference({
attribute: attribute,

@@ -243,2 +248,11 @@ valueBuilder: buildIriUrlExpression,

});
if (isXlinkHrefAttribute(attribute)) {
updateAttributeIdReference({
attribute: attribute,
valueBuilder: buildIdExpression,
idValueRegex: idExactMatchRegex,
idValuesContainer: state.idValuesContainer
});
}
});

@@ -245,0 +259,0 @@ }

4

package.json
{
"name": "babel-plugin-react-inline-svg-unique-id",
"version": "1.2.2",
"version": "1.3.0",
"description": "Babel plugin for applying generated ids to inline React SVG components",

@@ -39,3 +39,3 @@ "author": "Laurynas Aleksiūnas <laurynas.aleksiunas@gmail.com>",

},
"gitHead": "af5d2f9e382cc0ab89f03f271f0fedc9d571875b"
"gitHead": "17cff0f6b1d7e9daa5e5c372407a77a3f8918911"
}
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