map_diff 1.0.1+1 copy "map_diff: ^1.0.1+1" to clipboard
map_diff: ^1.0.1+1 copied to clipboard

A dart package to compare two maps and return the differences between them.

map_diff #

Build Status

A dart package to compare two maps and return the differences between them.

Getting Started #

Pubspec #

dependencies:
  map_diff: ^1.0.1

Example #

import 'package:map_diff/map_diff.dart';

void main() {
  final left = <String, dynamic>{
    'key': 'value',
    'key2': 'value2',
    'key3': {'key4': 'value4'},
    'key6': {
      'key7': {'key8': 'key9'}
    },
  };
  final right = <String, dynamic>{
    'key2': 'value2',
    'key3': {'key4': 'value5'},
    'key6': {'key7': {}},
  };

  final diff = mapDiff(left, right);

  print(diff); // {key: value, key3: {key4: value5}, key6: {key7: {key8: key9}}}
}

Tests #

dart run test/map_diff_test.dart
2
likes
160
points
7
downloads

Publisher

verified publisherfelipereis.me

Weekly Downloads

A dart package to compare two maps and return the differences between them.

Repository (GitHub)

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

collection

More

Packages that depend on map_diff