MCPcopy Create free account
hub / github.com/facebook/Rapid / changes

Method changes

modules/core/EditSystem.js:748–762  ·  view source on GitHub ↗

* changes * This returns a summery of all changes made from `base` -> `stable` * Optionally includes a given action function to apply to the `stable` graph. * @param {Function?} action - Optional action to apply to the `stable` graph * @return {Object} Object containing `modified`,

(action)

Source from the content-addressed store, hash-verified

746 * @return {Object} Object containing `modified`, `created`, `deleted` summary of changes
747 */
748 changes(action) {
749 let difference = this._fullDifference;
750
751 if (action) {
752 const base = this.base.graph;
753 const head = action(this.stable.graph);
754 difference = new Difference(base, head);
755 }
756
757 return {
758 created: difference.created(),
759 modified: difference.modified(),
760 deleted: difference.deleted()
761 };
762 }
763
764
765 /**

Callers 5

saveMethod · 0.45
_tryUploadMethod · 0.45
chooseMethod · 0.45
renderDisclosureContentFunction · 0.45
EditSystem.test.jsFile · 0.45

Calls 4

createdMethod · 0.80
modifiedMethod · 0.80
deletedMethod · 0.80
actionFunction · 0.50

Tested by

no test coverage detected