UNPKG

@socketsupply/socket

Version:

A Cross-Platform, Native Runtime for Desktop and Mobile Apps — Create apps using HTML, CSS, and JavaScript. Written from the ground up to be small and maintainable.

31 lines (23 loc) 471 B
import { isArrayLike, format } from '../util.js' export class Metric { init () {} update (value) {} destroy () {} toJSON () { return {} } toString () { return format(this) } [Symbol.iterator] () { if (isArrayLike(this)) { return Array.from(this) } return [this] } [Symbol.toStringTag] () { const name = this.constructor.name.replace('Metric', '') return `DiagnosticMetric(${name})` } } export default Metric