diff options
| author | rxliuli <rxliuli@gmail.com> | 2025-11-04 05:03:50 +0800 |
|---|---|---|
| committer | rxliuli <rxliuli@gmail.com> | 2025-11-04 05:03:50 +0800 |
| commit | bce557cc2dc767628bed6aac87301a1be7c5431b (patch) | |
| tree | b51a051228d01fe3306cd7626d4a96768aadb944 /node_modules/@jet-app/app-store/tmp/src/api/util.js | |
init commit
Diffstat (limited to 'node_modules/@jet-app/app-store/tmp/src/api/util.js')
| -rw-r--r-- | node_modules/@jet-app/app-store/tmp/src/api/util.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/node_modules/@jet-app/app-store/tmp/src/api/util.js b/node_modules/@jet-app/app-store/tmp/src/api/util.js new file mode 100644 index 0000000..a6d199c --- /dev/null +++ b/node_modules/@jet-app/app-store/tmp/src/api/util.js @@ -0,0 +1,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
\ No newline at end of file |
