Function implementSoftDeletion

Implements soft deletion for a given Meteor collection.

This function hooks into the before.remove lifecycle of the collection to prevent hard deletion. Instead, it moves deleted documents to the YsfSoftDeleted collection for potential restoration.

Additionally, it extends the collection schema to include fields for tracking soft deletion restoration.

  • Parameters

    • collectionObject: any

      The Meteor collection object to enhance with soft deletion.

    Returns Promise<void>