register(type, fn) {
    if (utils.isObject(type)) {
      for (let key of Object.keys(type)) this.register(key, type[key]);
      return this;
    }

    assert.equal(typeof fn, 'function', 'expected a function');
    const name = type.toLowerCase();

    if (fn.prototype instanceof this.Prompt) {
      this.prompts[name] = fn;
    } else {
      this.prompts[name] = fn(this.Prompt, this);
    }

    return this;
  }
Register a custom prompt type.

```js
const Enquirer = require('enquirer');
const enquirer = new Enquirer();
enquirer.register('customType', require('./custom-prompt'));
```
@name register()
@param {String} `type`
@param {Function|Prompt} `fn` `Prompt` class, or a function that returns a `Prompt` class.
@return {Object} Returns the Enquirer instance
@api public