/**
 * @Author: Caow
 * @Date: 2020-05-09 23:00:54
 */

const ignores = [
  'version',
  'author',
  'home_page',
  'init',
  'ready',
  'use',
  'mixin',
  'Namespace',
  'Initialized'
]

/**
 * Mix other plug-in attributes to BC
 * @param BC
 * @returns this
 */
export function initMixin(BC) {
  BC.mixin = function(mixin) {
    for (let key in mixin) {
      ignores.indexOf(key) < 0 && (BC[key] = mixin[key])
    }
    return this
  }
}
