code: function configureCustomSettings(context, settings, options) {
    const settingsAvailable = settings && typeof settings === 'object';
    const optionsAvailable = options && typeof options === 'object';
  
    const customOptions = optionsAvailable ? copy(options, deep) : {};
  
    const customSettings = settingsAvailable ?
      optionsAvailable ? merge(customOptions, settings) : settings :
      customOptions;
  
    context.custom = context.custom && typeof context.custom === 'object' ?
      merge(customSettings, context.custom) : customSettings;
  
    return context;
  }
docs: Configures the given context with the given custom settings (if any) and custom options (if any) by first shallow
  merging the given options into the given settings (without replacing any existing same named properties) and then by
  shallow merging these combined settings into any existing custom settings in context.custom (again without replacing
  any existing same named properties). So properties in context.custom take precedence over properties in settings,
  which take precedence over properties in options.
  
  @param {Object|CustomAware} context - the context to configure with custom settings and/or options
  @param {Object|undefined} [context.custom] - the object to configure with custom settings and/or options
  @param {CustomSettings|undefined} [settings] - custom settings to configure onto context.custom
  @param {CustomOptions|undefined} [options] - custom options to configure as defaults onto context.custom
  @returns {CustomAware} the given context configured with custom settings in context.custom