Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

record-diff.nu

A Nushell module for comparing two records and identifying nested differences with detailed change information. Makes differences in records human comprehensible.

Installation

do {
  ($NU_LIB_DIRS | default []) ++ ($env.NU_LIB_DIRS? | default [])  | uniq | input list "Clone to" | cd $in
  git clone https://github.com/cablehead/record-diff.nu ./record-diff
}

Update

cd to module directory ; git pull

Usage

use record-diff

$ record-diff {user: {name: "Bob"}} {user: {name: "Bob" email: "bob@example.com"}}

─#─┬────key─────┬─action─┬─value_before─┬───value_after───
 0  user.email  added                 bob@example.com
───┴────────────┴────────┴──────────────┴─────────────────

Testing

./test.nu

About

Nushell module to diff records

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages