All Projects → neighborhood999 → React Gh Like Diff

neighborhood999 / React Gh Like Diff

Licence: mit
➕➖ The react component to generate pretty HTML for comparing commits or text.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to React Gh Like Diff

Sitediff
SiteDiff makes it easy to see differences between two versions of a website.
Stars: ✭ 139 (+43.3%)
Mutual labels:  comparison, diff
Deepdiff
Deep Difference and search of any Python object/data.
Stars: ✭ 985 (+915.46%)
Mutual labels:  comparison, diff
Pandiff
Prose diffs for any document format supported by Pandoc
Stars: ✭ 110 (+13.4%)
Mutual labels:  comparison, diff
speech-recognition-evaluation
Evaluate results from ASR/Speech-to-Text quickly
Stars: ✭ 25 (-74.23%)
Mutual labels:  diff, comparison
microdiff
A fast, zero dependency object and array comparison library. Significantly faster than most other deep comparison libraries and has full TypeScript support.
Stars: ✭ 3,138 (+3135.05%)
Mutual labels:  diff, comparison
differ
Electron application to compare two directories
Stars: ✭ 48 (-50.52%)
Mutual labels:  diff, comparison
ncdu-diff
ncdu fork that can compare and diff results
Stars: ✭ 21 (-78.35%)
Mutual labels:  diff, comparison
Sirix
SirixDB is a temporal, evolutionary database system, which uses an accumulate only approach. It keeps the full history of each resource. Every commit stores a space-efficient snapshot through structural sharing. It is log-structured and never overwrites data. SirixDB uses a novel page-level versioning approach called sliding snapshot.
Stars: ✭ 638 (+557.73%)
Mutual labels:  comparison, diff
Mathematicavsr
Example projects, code, and documents for comparing Mathematica with R.
Stars: ✭ 41 (-57.73%)
Mutual labels:  comparison
Recursive Diff
A JavaScript library to find diff between two JavaScript Objects. Support for Array, Number, Date and other primitive data types.
Stars: ✭ 71 (-26.8%)
Mutual labels:  diff
Scarab
A system to patch your content files.
Stars: ✭ 38 (-60.82%)
Mutual labels:  diff
Pretty Time
Easily format the time from node.js `process.hrtime`. Works with timescales ranging from weeks to nanoseconds.
Stars: ✭ 44 (-54.64%)
Mutual labels:  diff
Pydiff
A simple GUI for python's difflib to compare files and directories
Stars: ✭ 74 (-23.71%)
Mutual labels:  diff
Php Arrays In Memory Comparison
How to store 11kk items in memory? Comparison of methods: array vs object vs SplFixedArray vs pack vs swoole_table vs swoole_pack vs redis vs memsql vs node.js arrays in php7
Stars: ✭ 83 (-14.43%)
Mutual labels:  comparison
Cytometry Clustering Comparison
R scripts to reproduce analyses in our paper comparing clustering methods for high-dimensional cytometry data
Stars: ✭ 30 (-69.07%)
Mutual labels:  comparison
Delta
A syntax-highlighting pager for git, diff, and grep output
Stars: ✭ 11,555 (+11812.37%)
Mutual labels:  diff
Jaydiff
A JSON diff utility
Stars: ✭ 84 (-13.4%)
Mutual labels:  diff
Cvise
Super-parallel Python port of the C-Reduce
Stars: ✭ 77 (-20.62%)
Mutual labels:  comparison
Ale
✌️a Flexible and fast JavaScript view framework
Stars: ✭ 67 (-30.93%)
Mutual labels:  diff
Python Patch
Library to parse and apply unified diffs
Stars: ✭ 65 (-32.99%)
Mutual labels:  diff

react-gh-like-diff

npm Build Status Maintainability codecov styled with prettier

react-gh-like-diff

Generate Github like comparison based on diff2html.

You can compare string or given unified diff to generate pretty HTML.

Demo

Edit React Github Like Diff Example

Installation

yarn add react-gh-like-diff

# or

npm install react-gh-like-diff --save

Configuration

react-gh-like-diff is based on diff2html. The default configuration:

const defaultOptions = {
  originalFileName: 'Unknown-File-Name',
  updatedFileName: 'Unknown-File-Name',
  inputFormat: 'diff',
  outputFormat: 'side-by-side',
  showFiles: false,
  matching: 'none',
  matchWordsThreshold: 0.25,
  matchingMaxComparisons: 2500,
  maxLineSizeInBlockForComparison: 200,
  maxLineLengthHighlight: 10000,
  renderNothingWhenEmpty: false
};

You can custom options for you want, just pass options as props. The configuration you can reference here. 🔎

Style

Import css style make sure render correctly:

import 'react-gh-like-diff/dist/css/diff2html.min.css';

You also can reference examples.

Props

past

string | defaults to ''

Passing past string as past prop with current prop for comparison.

current

string | defaults to ''

Passing current string as current prop with past prop for comparison.

diffString

string | defaults to ''

Passing unified diff as prop to generate pretty HTML.

options

object | optional, See here

Reference diff2html docs for extra configuration setting.

Inspiration

nakajmg - gh-diff-html

LICENSE

MIT © Peng Jie

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].