code: function parseResourceId(resourceId, incomplete) {
      var components = resourceId.split('/'),
          parsed;
  
      if (incomplete || components.length === 4) {
          parsed = {
              objectType: components[1],
              objectId: components[2],
              resourceId: components[3]
          };
      }
  
      return parsed;
  }
docs: Parses a string representing a Resource ID (representing a complete resource ID or a partial one: either the ID of
  an Object Type or an Object Instance).
  
  @param {String} resourceId       Id of the resource.
  @param {Boolean} incomplete      If present and true, return incomplete resources (Object Type or Instance).
  @returns {*}