node_modules/mdsvex/dist/main.es.js
// Factory to inject `plugins`. Takes `callback` for the actual inserting.
Factory to inject `plugins`. Takes `callback` for the actual inserting.
Factory to inject ` plugins ` . Takes ` callback ` for the actual inserting .
function useFactory(callback) {
  return use
  function use(key, plugins) {
    var self = this;
    var wareKey;
    if (!(key in self)) {
      throw new Error(
        'Illegal Invocation: Unsupported `key` for ' +
          '`use(key, plugins)`. Make sure `key` is a ' +
          'supported function'
      )
    }
    if (!plugins) {
      return
    }
    wareKey = key + 'Plugins';
    if (typeof plugins === 'function') {
      plugins = [plugins];
    } else {
      plugins = plugins.concat();
    }
    if (!self[wareKey]) {
      self[wareKey] = [];
    }
    callback(self, wareKey, plugins);
  }
}
function useFactory ( callback ) { return use function use ( key , plugins ) { var self = this ; var wareKey ; if ( ! ( key in self ) ) { throw new Error ( 'Illegal Invocation: Unsupported `key` for ' + '`use(key, plugins)`. Make sure `key` is a ' + 'supported function' ) } if ( ! plugins ) { return } wareKey = key + 'Plugins' ; if ( typeof plugins === 'function' ) { plugins = [ plugins ] ; } else { plugins = plugins . concat ( ) ; } if ( ! self [ wareKey ] ) { self [ wareKey ] = [ ] ; } callback ( self , wareKey , plugins ) ; } }
Factory to inject `plugins`.
Factory to inject ` plugins ` .
// Validate if `plugins` can be inserted. // Invokes the bound `callback` to do the actual inserting. // Throw if the method is not pluggable. // Fail silently when no plugins are given. // Make sure `plugins` is a list. // Make sure `wareKey` exists. // Invoke callback with the ware key and plugins.