code: function CMScope(manager, scope) {
    function o () {}
  
    o.prototype.create = function (obj, cb) {
      return manager.create.call(manager, scope, obj, cb);
    };
  
    o.prototype.remove = function (id) {
      return manager.remove.call(manager, scope, id);
    };
  
    o.prototype.removeAll = function () {
      var keys = manager.getKeys.call(manager);
      for (var i = 0, len = keys.length; i < len; i++) {
        manager.remove.call(manager, scope, keys[i]);
      }
    };
  
    o.prototype.get = function (id, creds) {
      return manager.get.call(manager, scope, id, creds);
    };
  
    o.prototype.getOrCreate = function (id, obj, cb) {
      var client = manager.get.call(manager, scope, id, obj.credentials);
      if (! client) {
        manager.create.call(manager, scope, obj, cb);
      }
    };
  
    o.prototype.move = function (oldID, oldcreds, newID, newcreds) {
      return manager.move.call(manager, scope, oldID, oldcreds, newID, newcreds);
    };
  
    o.prototype.exists = function (id) {
      return manager.exists.call(manager, id);
    };
  
    o.prototype.referenceCount = function (id) {
      return manager.referenceCount.call(manager, id);
    };
  
    o.prototype.getKeys = function () {
      return manager.getKeys.call(manager);
    };
  
    o.prototype.removeListeners = function (id) {
      return manager.removeListeners.call(manager, scope, id);
    };
  
    o.prototype.__getScope = function () { return scope; };
  
    return new o();
  }
docs: /*
  Wrapper: CMScope
  
  the CMScope object is essentially a wrapper for the ConnectionManager to
  protect persistent information from other platforms. So a platform cannot
  hijack another platforms client instance (an xmpp connection, for example)
  
  it curries all the functions of the ConnectionManager singleton with platform
  and sessionId, making the interface very simple for the platform user.
  
  Parameters:
  
  scope  - scope object
  
  Returns:
  
  CMScope object