modules/actions/add_entity.js (5 lines of code) (raw):

export function actionAddEntity(way) { return function(graph) { return graph.replace(way); }; }