@lou.codes/diff
v3.0.11
Published
↔️ Deep diffing utility.
Downloads
64
Maintainers
Readme
↔️ Deep diffing utility.
Usage
📦 Node
Install @lou.codes/diff
as a dependency:
pnpm add @lou.codes/diff
# or
npm install @lou.codes/diff
# or
yarn add @lou.codes/diff
Import it and use it:
import { compare } from "@lou.codes/diff";
compare({ left: "Lou", right: "Nope" }); // [{ kind: 4, left: "Lou", right: "Nope", path: [] }]
🦕 Deno
Import @lou.codes/diff
using the npm:
prefix, and use it directly:
import { compare } from "npm:@lou.codes/diff";
compare({ left: "Lou", right: "Nope" }); // [{ kind: 4, left: "Lou", right: "Nope", path: [] }]
🌎 Browser
Import @lou.codes/diff
using esm.sh, and use it directly:
<script type="module">
import { compare } from "https://esm.sh/@lou.codes/diff";
compare({ left: "Lou", right: "Nope" }); // [{ kind: 4, left: "Lou", right: "Nope", path: [] }]
</script>
Useful links
- 📝 Documentation: TypeDoc generated documentation.
- ⏳ Changelog: List of changes between versions.
- ✅ Tests Coverage: Coveralls page with tests coverage.