New package – jam:soft-delete – An easy way to add soft deletes

jam:soft-delete is an easy way to add a soft delete mechanism to your app. Its key features are:

  • Zero config needed (though you can customize)
  • Isomorphic so that it works with Optimistic UI
  • Automatically overrides removeAsync to make it a soft delete
  • Automatically adds the soft delete flag to the filter for your queries, e.g. .find, so you don’t need to make any changes to them
  • Recover soft deleted docs with recoverAsync collection method
  • Explicitly soft delete with softRemoveAsync collection method (optional)
  • Optionally add a deletedAt timestamp
  • Compatible with Meteor 2.8.1+ and 3.0+

If you end up giving it a go or have ideas on how to make it better, let me know!

13 Likes

Man, you are doing packages that are in many cases a must.
I will have to take a look into the code to make sure that it is compatible with my existing implementation of this feature.

3 Likes

In my mind I think of all of jam’s packages as the jam stack, to the point I’ve forgotten what the original JAM stack was even meant to be.

2 Likes