summaryrefslogtreecommitdiff
path: root/node_modules/@jet-app/app-store/tmp/src/api/util.js
blob: a6d199cdfff3a7c61a5563f74c618a952d9a768b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/**
 * Ensures that Adam IDs are always represented with the same format
 *
 * "ID" segments in a URL typically include an `id` prefix that should
 * not be present when using the value as an identifier for a resource
 * in the Media APi.
 *
 * This function strips the prefix if present
 */
export function normalizeAdamID(raw) {
    if (raw.startsWith("id")) {
        return raw.substring(2);
    }
    return raw;
}
//# sourceMappingURL=util.js.map