Socket
Socket
Sign inDemoInstall

@ads-vdh/md-diff

Package Overview
Dependencies
9
Maintainers
3
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @ads-vdh/md-diff

A diffing implementation for comparing & returning markdown text deltas


Version published
Weekly downloads
5
increased by400%
Maintainers
3
Install size
0.998 MB
Created
Weekly downloads
 

Readme

Source

About

A diffing implementation for comparing & returning markdown text deltas

Wraps difflib and provides deltas as text via demarcating edits tags:

Example

oldText: your question site
newText: your answer site
output: your <del>question</del> <ins>answer</ins> site

Installation

Install on npm

npm install @ads-vdh/md-diff --save

Usage

let diffText = require("@ads-vdh/md-diff")

let oldText = "your question site"
let newText = "your answer site"

let output = diffText(oldText, newText, false)

console.log(output)
// "your <del>question</del> <ins>answer</ins> site"

Keywords

FAQs

Last updated on 01 May 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc