UNPKG

477 BJavaScriptView Raw
1"use strict";
2var DagGraph_1 = require("../DagGraph");
3var log = require('debug')('redux-dag-history:DagHistory');
4function squash(history) {
5 log('squashing history');
6 var graph = history.graph, current = history.current;
7 return {
8 current: current,
9 graph: graph.withMutations(function (g) { return new DagGraph_1.default(g).squashCurrentBranch(); }),
10 };
11}
12Object.defineProperty(exports, "__esModule", { value: true });
13exports.default = squash;