UNPKG

rxjs-obd

Version:

RxJS Implementation for OBD (On Board Diagnostics) of vehicles via ELM 327 connections.

22 lines 619 B
/** * OBD Field representation. */ export class OBDField { /** * The OBD Field constructor. * @param code The code. * @param label The label. * @param unit The unit. * @param value The initial value. * @param formatter projector to format the value. */ constructor(code, label, unit, value, formatter) { this.code = code; this.label = label; this.unit = unit; this.value = value; this.formatter = formatter; this.formatted = formatter ? formatter(unit, value) : `${value} ${unit}`; } } //# sourceMappingURL=OBDField.js.map