code: function newContext(context, params) {
    if (!params) {
      return context;
    }
  
    return assign({}, context, {
      data: params.data ? arrayPush(params.data, context.data) : context.data,
      parent: params.newParent ? context : context.parent,
      index: 'index' in params ? params.index : context.index,
      item: 'item' in params ? params.item : context.item
    });
  }
docs: Rebuild local variables in the new context