Get started with microdiff CDN
MIT licensed
Microdiff is a lightweight library for computing the difference between two sets of JS objects, useful for implementing undo/redo functionality or merging branches in real-time collaborative applications.
Tags:- comparison
- diff
Stable version
Copied!
How to start using microdiff CDN
<!DOCTYPE html>
<html>
<head>
<title>Get started with microdiff CDN - cdnhub.io</title>
<script src="https://cdn.cdnhub.io/microdiff/1.3.2/index.js"></script>
</head>
<body>
<button id="compare">Compare</button>
<script>
const oldData = { name: 'John Doe', age: 30 };
const newData = { name: 'Jane Doe', age: 35 };
document.getElementById('compare').addEventListener('click', () => {
const diff = microdiff(oldData, newData);
console.log(diff);
});
</script>
</body>
</html>
Copied!
Copied!