UNPKG

check-ethereum-scanner

Version:

Safety checks for new Ethereum tokens

27 lines (21 loc) 478 B
'use strict' class Base { constructor (name, code, implementation, alphabet) { this.name = name this.code = code this.alphabet = alphabet if (implementation && alphabet) { this.engine = implementation(alphabet) } } encode (stringOrBuffer) { return this.engine.encode(stringOrBuffer) } decode (stringOrBuffer) { return this.engine.decode(stringOrBuffer) } isImplemented () { return this.engine } } module.exports = Base