demo/bundle.js
/**
             * Normalize all injections into Object-based format
             */
Normalize all injections into Object-based format
Normalize all injections into Object - based format
function normalizeInject (options, vm) {
              var inject = options.inject;
              if (!inject) { return }
              var normalized = options.inject = {};
              if (Array.isArray(inject)) {
                for (var i = 0; i < inject.length; i++) {
                  normalized[inject[i]] = { from: inject[i] };
                }
              } else if (isPlainObject(inject)) {
                for (var key in inject) {
                  var val = inject[key];
                  normalized[key] = isPlainObject(val)
                    ? extend({ from: key }, val)
                    : { from: val };
                }
              } else if (process.env.NODE_ENV !== 'production') {
                warn(
                  "Invalid value for option \"inject\": expected an Array or an Object, " +
                  "but got " + (toRawType(inject)) + ".",
                  vm
                );
              }
            }
function normalizeInject ( options , vm ) { var inject = options . inject ; if ( ! inject ) { return } var normalized = options . inject = { } ; if ( Array . isArray ( inject ) ) { for ( var i = 0 ; i < inject . length ; i ++ ) { normalized [ inject [ i ] ] = { from : inject [ i ] } ; } } else if ( isPlainObject ( inject ) ) { for ( var key in inject ) { var val = inject [ key ] ; normalized [ key ] = isPlainObject ( val ) ? extend ( { from : key } , val ) : { from : val } ; } } else if ( process . env . NODE_ENV !== 'production' ) { warn ( "Invalid value for option \"inject\": expected an Array or an Object, " + "but got " + ( toRawType ( inject ) ) + "." , vm ) ; } }
Normalize all injections into Object-based format
Normalize all injections into Object - based format