UNPKG

@ocap/statedb-memory

Version:

OCAP statedb adapter that uses memory as backend statedb, just for test purpose

15 lines (11 loc) 318 B
const MemoryTable = require('./base'); class TokenTable extends MemoryTable { // eslint-disable-next-line require-await async existBySymbol(symbol) { if (!symbol) { throw new Error('param symbol is required'); } return this.collection.count({ symbol }) > 0; } } module.exports = TokenTable;