dashpresshq/dashpress

View on GitHub
src/frontend/views/entity/Relations/utils.ts

Summary

Maintainability
A
0 mins
Test Coverage
C
75%
export const getFieldsOffFormat = (format: string): string[] => {
  if (!format) {
    return [];
  }
  return [...(format.match(/[^{{}]+(?=}})/g) || [])].map((field) =>
    field.trim()
  );
};