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.6 to 0.0.7

index.html

15

dist/react-diff.js

@@ -7,6 +7,6 @@ 'use strict';

var fnMap = {
chars: jsdiff.diffChars,
words: jsdiff.diffWords,
sentences: jsdiff.diffSentences,
json: jsdiff.diffJson
'chars': jsdiff.diffChars,
'words': jsdiff.diffWords,
'sentences': jsdiff.diffSentences,
'json': jsdiff.diffJson
};

@@ -33,3 +33,3 @@

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 = {

@@ -40,3 +40,3 @@ backgroundColor: part.added ? 'lightgreen' : part.removed ? 'salmon' : 'lightgrey'

'span',
{ style: spanStyle },
{ key: index, style: spanStyle },
part.value

@@ -50,3 +50,4 @@ );

);
} });
}
});

@@ -44,3 +44,3 @@ var React = require('react');

backgroundColor: part.added ? 'lightgreen' : part.removed ? 'salmon' : 'lightgrey'
}
};
return <span key={index} style={spanStyle}>{part.value}</span>

@@ -47,0 +47,0 @@ });

{
"name": "react-diff",
"version": "0.0.6",
"version": "0.0.7",
"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