How to use the @phenyl/utils.assertValidEntityName function in @phenyl/utils

To help you get started, we’ve selected a few @phenyl/utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github phenyl / phenyl / modules / standards / src / foreign-query-wrapper.ts View on Github external
function assertValidForeignQuery(foreign: any, dataName: string) {
  if (foreign == null) {
    return;
  }
  const { documentPath, entityName } = foreign;
  assertNonEmptyString(
    documentPath,
    `${dataName}.foreign.documentPath must be a non-empty string.`
  );
  assertValidEntityName(entityName, `${dataName}.foreign`);
}
export const GeneralForeignQueryWrapper: typeof ForeignQueryWrapper = ForeignQueryWrapper;