function transformChip(chip) {
            // If it is an object, it's already a known chip
            if (angular.isObject(chip)) {
                return chip;
            }

            // Otherwise, create a new one
            return { name: chip, type: 'new' }
        }
/**
         * Return the proper object when the append is called.
         */
Return the proper object when the append is called.
Return the proper object when the append is called .
function transformChip(chip) {
            if (angular.isObject(chip)) {
                return chip;
            }
            return { name: chip, type: 'new' }
        }
function transformChip ( chip ) { if ( angular . isObject ( chip ) ) { return chip ; } return { name : chip , type : 'new' } }
Return the proper object when the append is called.
Return the proper object when the append is called .
// If it is an object, it's already a known chip // Otherwise, create a new one