UNPKG

@zandor300/jsmodbus

Version:

Implementation for the Serial/TCP Modbus protocol.

22 lines (21 loc) 550 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isInternalException = isInternalException; const InternalErrorMessagesArray = [ 'InvalidStartAddress', 'InvalidQuantity', 'InvalidArraySize', 'InvalidBufferSize', 'InvalidCoilsInput', 'InvalidType_MustBeBufferOrArray', 'InvalidValue' ]; function isInternalException(x) { if (typeof x !== 'object') { return false; } if (InternalErrorMessagesArray.includes(x.message)) { return true; } return false; }