API reference / @evolu/common / Evolu/Owner / createShardOwner

Function: createShardOwner()

function createShardOwner(appOwner, path): ShardOwner;

Defined in: packages/common/src/Evolu/Owner.ts:156

Creates a ShardOwner derived from an AppOwner using the specified path.

Example

const contactsShard = createShardOwner(appOwner, ["contacts"]);
const projectShard = createShardOwner(appOwner, [
  "projects",
  "project-1",
]);

Parameters

ParameterType
appOwnerAppOwner
pathreadonly [string, string]

Returns

ShardOwner

Was this page helpful?