amfUtils.js
function amfXDecodeOne(rules, buffer) {
    if (!rules[buffer.readUInt8(0)]) {
        console.log('Unknown field', buffer.readUInt8(0));
        throw new Error("Error: Unknown field");
    }
    return rules[buffer.readUInt8(0)](buffer);
}
function amfXDecodeOne(rules, buffer) {
    if (!rules[buffer.readUInt8(0)]) {
        console.log('Unknown field', buffer.readUInt8(0));
        throw new Error("Error: Unknown field");
    }
    return rules[buffer.readUInt8(0)](buffer);
}
function amfXDecodeOne ( rules , buffer ) { if ( ! rules [ buffer . readUInt8 ( 0 ) ] ) { console . log ( 'Unknown field' , buffer . readUInt8 ( 0 ) ) ; throw new Error ( "Error: Unknown field" ) ; } return rules [ buffer . readUInt8 ( 0 ) ] ( buffer ) ; }
Decode one value from the Buffer according to the applied rules
@param rules
@param buffer
@returns {*}
Decode one value from the Buffer according to the applied rules