UNPKG

@cocreate/crud-client

Version:

An useful CRUD api operate Create, read, update, delete with built in database. Can be used as a firebase alternative. Easily configured using HTML5 attributes and/or JavaScript API.

28 lines (21 loc) 949 B
async function testCollections() { let createCollection = await CoCreate.crud.createCollection({ database: ['testDB', 'testDB1', 'testDB2'], array: ['testCollection', 'testCollection1', 'testCollection2'] }) console.log('createCollection', createCollection) let readCollection = await CoCreate.crud.readCollection({ database: ['testDB', 'testDB1', 'testDB2'], }) console.log('readCollection', readCollection) let updateCollection = await CoCreate.crud.updateCollection({ database: ['testDB', 'testDB1', 'testDB2'], array: { testCollection: 'testCollectionA' } }) console.log('updateCollection', updateCollection) let deleteCollection = await CoCreate.crud.deleteCollection({ database: ['testDB', 'testDB1', 'testDB2'], array: ['testCollectionA', 'testCollection1', 'testCollection2'] }) console.log('deleteCollection', deleteCollection) }