parseDatasetId

Function

Parse item ID and layer ID (if any) from dataset record ID

  • parseDatasetId(datasetId: string) : {
    itemId:
    string
    layerId:
    string
    }

Parameters

Parameter Type Default Notes
datasetId Required string

Hub API dataset record id ({itemId}_{layerId} or {itemId})

Returns

A hash with the itemId and layerId (if any)

{
itemId:
string
layerId:
string
}

Function defined in common/src/content/slugs.ts:13