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

react-diff

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-diff - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

4

lib/react-diff.js

@@ -41,7 +41,7 @@ var React = require('react');

var diff = fnMap[this.props.type](this.props.inputA, this.props.inputB);
var result = diff.map(function(part) {
var result = diff.map(function(part, index) {
var spanStyle = {
backgroundColor: part.added ? 'lightgreen' : part.removed ? 'salmon' : 'lightgrey'
}
return <span style={spanStyle}>{part.value}</span>
return <span key={index} style={spanStyle}>{part.value}</span>
});

@@ -48,0 +48,0 @@ return (

{
"name": "react-diff",
"version": "0.0.5",
"version": "0.0.6",
"description": "Highlight differences between inputs",

@@ -5,0 +5,0 @@ "main": "dist/react-diff.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