| 1 2 3 4 5 6 7 8 9 10 11 12 13 | 2x 2x 2x 2x 1x | import {isUndefined} from 'lodash';
export default function(csrf, method){
let hidden = {_method: method};
hidden[csrf.param] = csrf.token;
return function(data){
if (isUndefined(data)) return hidden;
return Object.assign(data, hidden);
};
};
|