Last updated:
0 purchases
map diff
map_diff #
A dart package to compare two maps and return the differences between them.
Getting Started #
Pubspec #
dependencies:
map_diff: ^1.0.1
copied to clipboard
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}}}
}
copied to clipboard
Tests #
dart run test/map_diff_test.dart
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.