recordKey

tcmts.records.recordKey · #j4x3d7cf · term · runs anywhere

A release's record key: <package>:<version>, with what a record key can't hold (a scope's @ and /) as ~.

export const recordKey = (r: { package: string; version: string }): string =>
  `${r.package}:${r.version}`.replace(/[^A-Za-z0-9._:~-]/g, "~")

used by