node-fmamsg: Sun FMA Message ID Library
Introduction
This library parses Sun FMA Message IDs of the following form:
ZFS-8000-HC
It validates the identifier and returns a hash:
name: 'ZFS' value: 16
Exceptions are thrown for malformed identifiers, checksum errors, etc. The library can also encode name-value pairs back into strings.
Installation
npm install fmamsg
Usage
var fmamsg = ; /* Decode: */var obj = fmamsg;console; /* Encode: */var str = fmamsg;console;