UNPKG

scrivito

Version:

Scrivito is a professional, yet easy to use SaaS Enterprise Content Management Service, built for digital agencies and medium to large businesses. It is completely maintenance-free, cost-effective, and has unprecedented performance and security.

18 lines (15 loc) 445 B
import { ArgumentError, isCamelCase, isSystemAttribute, } from 'scrivito_sdk/common'; export function assertValidAttributeName(attributeName: string): void { if (!isCamelCase(attributeName)) { throw new ArgumentError('Attribute names have to be in camel case.'); } if (isSystemAttribute(attributeName)) { throw new ArgumentError( `Attribute name "${attributeName}" is not a valid custom attribute name.` ); } }