Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/muschellij2/diffr
R package for creating code differences in JavaScript based on codediff.js
https://github.com/muschellij2/diffr
Last synced: 29 days ago
JSON representation
R package for creating code differences in JavaScript based on codediff.js
- Host: GitHub
- URL: https://github.com/muschellij2/diffr
- Owner: muschellij2
- Created: 2015-11-19T20:24:41.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2024-05-28T19:25:09.000Z (7 months ago)
- Last Synced: 2024-05-29T10:26:04.367Z (7 months ago)
- Language: JavaScript
- Size: 93.8 KB
- Stars: 61
- Watchers: 5
- Forks: 5
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-shiny-extensions - diffr - Create code diff widgets based on codediff.js. (UI Components / Code Diff)
README
[![Travis-CI Build Status](https://travis-ci.org/muschellij2/diffr.svg?branch=master)](https://travis-ci.org/muschellij2/diffr)
R package for creating code differences in JavaScript based on:
https://github.com/danvk/codediff.js
``` r
library(diffr)
file1 = tempfile()
writeLines("hello, world!\n", con = file1)
file2 = tempfile()
writeLines(paste0(
"hello world?\nI don't get it\n",
paste0(sample(letters, 65, replace = TRUE), collapse = "")), con = file2)
diffr(file1, file2, before = "f1", after = "f2")
```![](img/diffr-example.png)