isDid
A DID as the DID syntax has it (did:<method>:<id>, the id of letters, digits and ._:%-): no /, ? or #.
export const isDid = (s: string): boolean => s.length <= 2048 && /^did:[a-z]+:[A-Za-z0-9._:%-]*[A-Za-z0-9._-]$/.test(s)
A DID as the DID syntax has it (did:<method>:<id>, the id of letters, digits and ._:%-): no /, ? or #.
export const isDid = (s: string): boolean => s.length <= 2048 && /^did:[a-z]+:[A-Za-z0-9._:%-]*[A-Za-z0-9._-]$/.test(s)