function registerType(nodeSet,type,constructor,opts) {
    if (typeof type !== "string") {
        // This is someone calling the api directly, rather than via the
        // RED object provided to a node. Log a warning
        log.warn("["+nodeSet+"] Deprecated call to RED.runtime.nodes.registerType - node-set name must be provided as first argument");
        opts = constructor;
        constructor = type;
        type = nodeSet;
        nodeSet = "";
    }
    if (opts) {
        if (opts.credentials) {
            credentials.register(type,opts.credentials);
        }
        if (opts.settings) {
            try {
                settings.registerNodeSettings(type,opts.settings);
            } catch(err) {
                log.warn("["+type+"] "+err.message);
            }
        }
    }
    if(!(constructor.prototype instanceof Node)) {
        if(Object.getPrototypeOf(constructor.prototype) === Object.prototype) {
            util.inherits(constructor,Node);
        } else {
            var proto = constructor.prototype;
            while(Object.getPrototypeOf(proto) !== Object.prototype) {
                proto = Object.getPrototypeOf(proto);
            }
            //TODO: This is a partial implementation of util.inherits >= node v5.0.0
            //      which should be changed when support for node < v5.0.0 is dropped
            //      see: https://github.com/nodejs/node/pull/3455
            proto.constructor.super_ = Node;
            if(Object.setPrototypeOf) {
                Object.setPrototypeOf(proto, Node.prototype);
            } else {
                // hack for node v0.10
                proto.__proto__ = Node.prototype;
            }
        }
    }
    registry.registerType(nodeSet,type,constructor,opts);
}
Registers a node constructor
@param nodeSet - the nodeSet providing the node (module/set)
@param type - the string type name
@param constructor - the constructor function for this node type
@param opts - optional additional options for the node