@textile/hub > Client > deleteCollection
Client.deleteCollection() method
Deletes an existing collection.
Signature:
deleteCollection(threadID: ThreadID, name: string): Promise<void>;
Parameters
Parameter | Type | Description |
---|---|---|
threadID | ThreadID | the ID of the database. |
name | string | The human-readable name for the collection. |
Returns:
Promise<void>
Example
import {Client, ThreadID} from '@textile/hub'
async function deleteAstronauts (client: Client, thread: ThreadID) {
await client.deleteCollection(thread, 'astronauts')
return
}