code: function normalizeInject (options, vm) {
    const inject = options.inject;
    if (!inject) return
    const normalized = options.inject = {};
    if (Array.isArray(inject)) {
      for (let i = 0; i < inject.length; i++) {
        normalized[inject[i]] = { from: inject[i] };
      }
    } else if (isPlainObject(inject)) {
      for (const key in inject) {
        const val = inject[key];
        normalized[key] = isPlainObject(val)
          ? extend({ from: key }, val)
          : { from: val };
      }
    } else {
      warn(
        `Invalid value for option "inject": expected an Array or an Object, ` +
        `but got ${toRawType(inject)}.`,
        vm
      );
    }
  }
docs: Normalize all injections into Object-based format