Deleting documents

You can delete documents by using the remove() method.

This method immediately removes the document from your bucket.

The following example shows how to delete a document:
var myBucket = myCluster.openBucket();
myBucket.remove('document_name', function(err, res) {
  if (err) {
    console.log('operation failed', err);
    /*
    operation failed { [Error: The key does not exist on the server] code: 13 }
    */
    return;
  }

  console.log('success!', res);
});

Sample output from the example:

success! { cas: { '0': 3085434880, '1': 1679242314 } }