CipherStash Documentation

Delete collection

If you don’t need a collection anymore and would like to delete it and all its records, you can use the deleteCollection API.

import { Stash } from '@cipherstash/stashjs';

const deleteMoviesCollection = async () => {
  const stash = await Stash.connect();
  // In order to delete a collection you need to know its name.
  // In this case we'll try and delete the movies collection.
  const collectionName = 'movies';
  await stash.deleteCollection(collectionName);