dryvPacks

@dryv/next-api-bridgev0.1.0

Next.js server actions over next-api-bridge, with routes, form actions and types.

Next API BridgeClientsUnitPublished 7 days ago2 downloads

dryv pack add @dryv/next-api-bridge
301 BRaw ↗
typescript
/**
 * Converts enum wire values into human-readable labels for generated UI.
 */
export function enumLabel(value: string): string {
  return value
    .replace(/^[-+]/, '')
    .replace(/[_-]+/g, ' ')
    .replace(/([a-z0-9])([A-Z])/g, '$1 $2')
    .replace(/\b\w/g, (char) => char.toUpperCase());
}