csv-differ
This plugin parses a CSV and outputs an item-by-item diff against a collection of objects.
It will accept both File
and String
arguments as CSV.
Example usage:
Initialize service
const service = await
Get all records with detected changes
servicechangedRecords// => [// {// "record":{"slug":"test","firstName":"Aaron"},// "diff":{"added":{},"deleted":{},"updated":{"firstName":"Aaron"}}// },// ..// ]
Update a single record (assuming you provided a function)
service
Update all changed records
service