parseWorkspaceStringKey
parseWorkspaceStringKey(
key):ParsedWorkspaceKey
Defined in: ootle/src/helpers/workspace.ts:29
Parses a workspace key string, supporting dot-notation offsets.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Example
Section titled “Example”parseWorkspaceStringKey("bucket") // { name: "bucket", offset: null } parseWorkspaceStringKey("bucket.0") // { name: "bucket", offset: 0 } parseWorkspaceStringKey("bucket.1") // { name: "bucket", offset: 1 }Throws
Section titled “Throws”if the key contains more than one dot, or if the suffix after the dot is empty / non-numeric / negative.