From 0ae0abcfc3bb84071312487fef33dcd73278223e Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Thu, 29 Sep 2016 17:20:27 -0700 Subject: [PATCH] [API] Update ObjectAPI to match docs --- src/api/objects/ObjectAPI.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/api/objects/ObjectAPI.js b/src/api/objects/ObjectAPI.js index 9e8deabb46..2d0770e5bc 100644 --- a/src/api/objects/ObjectAPI.js +++ b/src/api/objects/ObjectAPI.js @@ -8,10 +8,6 @@ define([ MutableObject ) { - /** - Object API. Intercepts the existing object API while also exposing - A new Object API. - */ /** * Utilities for loading, saving, and manipulating domain objects. @@ -158,6 +154,9 @@ define([ * @method mutate * @memberof module:openmct.ObjectAPI# */ + Objects.mutate = function (domainObject, path, value) { + return new MutableObject(domainObject).set(path, value); + }; /** * Observe changes to a domain object. @@ -168,6 +167,9 @@ define([ * @method observe * @memberof module:openmct.ObjectAPI# */ + Objects.observe = function (domainObject, path, callback) { + return new MutableObject(domainObject).on(path, callback); + }; /** * Uniquely identifies a domain object.