src/index.js
function initApi(Mutt) {
  // Setup the config
  const config = new MuttConfig()
  Mutt.config = config

  // Setup plugin interface
  Mutt.use = function(plugins) {
    if (!Array.isArray(plugins)) {
      plugins = [plugins]
    }

    for (const plugin of plugins) {
      Mutt.config.use(plugin)
    }
  }

  // Setup Utilities
  Mutt.logger = logger
  Mutt.mixin = mixin

  // Add in hooks for fields, widgets & validators
  Mutt.fields = fields
  Mutt.widgets = widgets
  Mutt.validators = validators
  Mutt.serializers = serializers
}
function initApi(Mutt) {
  // Setup the config
  const config = new MuttConfig()
  Mutt.config = config

  // Setup plugin interface
  Mutt.use = function(plugins) {
    if (!Array.isArray(plugins)) {
      plugins = [plugins]
    }

    for (const plugin of plugins) {
      Mutt.config.use(plugin)
    }
  }

  // Setup Utilities
  Mutt.logger = logger
  Mutt.mixin = mixin

  // Add in hooks for fields, widgets & validators
  Mutt.fields = fields
  Mutt.widgets = widgets
  Mutt.validators = validators
  Mutt.serializers = serializers
}
function initApi ( Mutt ) { // Setup the config const config = new MuttConfig ( ) Mutt . config = config // Setup plugin interface Mutt . use = function ( plugins ) { if ( ! Array . isArray ( plugins ) ) { plugins = [ plugins ] } for ( const plugin of plugins ) { Mutt . config . use ( plugin ) } } // Setup Utilities Mutt . logger = logger Mutt . mixin = mixin // Add in hooks for fields, widgets & validators Mutt . fields = fields Mutt . widgets = widgets Mutt . validators = validators Mutt . serializers = serializers }
Internal setup for Mutt API
@private
Internal setup for Mutt API