How to use the @nestjsx/util.isArrayStrings function in @nestjsx/util

To help you get started, we’ve selected a few @nestjsx/util 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 nestjsx / crud / packages / crud-request / src / request-query.validator.ts View on Github external
export function validateJoin(join: QueryJoin): void {
  if (!isObject(join) || !isStringFull(join.field)) {
    throw new RequestQueryException('Invalid join field. String expected');
  }
  if (!isUndefined(join.select) && !isArrayStrings(join.select)) {
    throw new RequestQueryException('Invalid join select. Array of strings expected');
  }
}
github nestjsx / crud / packages / crud-request / lib / request-query.validator.js View on Github external
function validateJoin(join) {
    if (!util_1.isObject(join) || !util_1.isStringFull(join.field)) {
        throw new exceptions_1.RequestQueryException('Invalid join field. String expected');
    }
    if (!util_1.isUndefined(join.select) && !util_1.isArrayStrings(join.select)) {
        throw new exceptions_1.RequestQueryException('Invalid join select. Array of strings expected');
    }
}
exports.validateJoin = validateJoin;
github nestjsx / crud / packages / crud-request / lib / request-query.validator.js View on Github external
function validateFields(fields) {
    if (!util_1.isArrayStrings(fields)) {
        throw new exceptions_1.RequestQueryException('Invalid fields. Array of strings expected');
    }
}
exports.validateFields = validateFields;
github nestjsx / crud / packages / crud-request / src / request-query.validator.ts View on Github external
export function validateFields(fields: QueryFields): void {
  if (!isArrayStrings(fields)) {
    throw new RequestQueryException('Invalid fields. Array of strings expected');
  }
}