lib/builder/constructor-builder.js
function requireTypeFromBuffer(buffer) {
    var typeId = buffer.slice(0, 4).toString('hex');
    var type = typeById[typeId];
    if (!type) {
        var msg = 'Unable to retrieve a Type by Id [' + typeId + ']';
        registryLogger.error(msg);
        throw new Error(msg);
    }
    if (registryLogger.isDebugEnabled()) {
        registryLogger.debug('Require Type \'%s\' by id [%s]', type.typeName, typeId);
    }
    return type;
}
function requireTypeFromBuffer(buffer) {
    var typeId = buffer.slice(0, 4).toString('hex');
    var type = typeById[typeId];
    if (!type) {
        var msg = 'Unable to retrieve a Type by Id [' + typeId + ']';
        registryLogger.error(msg);
        throw new Error(msg);
    }
    if (registryLogger.isDebugEnabled()) {
        registryLogger.debug('Require Type \'%s\' by id [%s]', type.typeName, typeId);
    }
    return type;
}
function requireTypeFromBuffer ( buffer ) { var typeId = buffer . slice ( 0 , 4 ) . toString ( 'hex' ) ; var type = typeById [ typeId ] ; if ( ! type ) { var msg = 'Unable to retrieve a Type by Id [' + typeId + ']' ; registryLogger . error ( msg ) ; throw new Error ( msg ) ; } if ( registryLogger . isDebugEnabled ( ) ) { registryLogger . debug ( 'Require Type \'%s\' by id [%s]' , type . typeName , typeId ) ; } return type ; }
Retrieve a Type constructor reading the id from buffer
Retrieve a Type constructor reading the id from buffer