import { helper } from 'ember-helper';
import { assign } from 'ember-platform';
import $ from 'jquery';

// Feeds uses this helper to pass context variables to individual components. 
// Cloning the context ensures encapsulation allowing us to feel confident
// when using context information for tracking purposes
export default helper(function ([context], params) {
  let newContext = $.extend(true, {}, context);
  return assign(newContext, params);
});
