Files
medusa-store/packages/utils/src/common/camel-to-snake-case.ts
Carlos R. L. Rodrigues 884428a1b5 feat: event aggregator (#6218)
What:
- Event Aggregator Util
- Preparation for normalizing event in a new format (backward compatible with the current format)
- GQL Schema to joiner config and some Entities configured
- Link modules emmiting events
2024-02-05 11:59:10 +00:00

3 lines
103 B
TypeScript

export const camelToSnakeCase = (string) =>
string.replace(/([a-z])([A-Z])/g, "$1_$2").toLowerCase()