Showing 9 of 9 total issues
Avoid too many return
statements within this function. Open
Open
else if (schema instanceof Number || schema instanceof BigInt || schema instanceof Decimal128 || instance === 'Number') return this.randomNumber(min, max);
Avoid too many return
statements within this function. Open
Open
else if (schema instanceof Schema.Types.Date || instance === 'Date') return new Date();
Avoid too many return
statements within this function. Open
Open
else if (schema instanceof String || schema instanceof Buffer || instance === 'String') return this.generateStringBasedOnSchemaOptions(schema.options);
Avoid too many return
statements within this function. Open
Open
else if (schema instanceof Boolean || instance === 'Boolean') return Math.random() < 0.5;
Avoid too many return
statements within this function. Open
Open
else if (schema instanceof (Schema.Types.UUID || String)) return uuid();
Avoid too many return
statements within this function. Open
Open
else if (schema instanceof Types.Subdocument || schema.schema?.paths || instance === 'Embedded') return this.iterate(schema.schema, {}, iteration);
Avoid too many return
statements within this function. Open
Open
return this.constructor.getFallbackValue(schema);
Avoid too many return
statements within this function. Open
Open
else if (schema instanceof Schema.Types.DocumentArray || schema instanceof Schema.Types.Array || instance === 'Array') return [...Array(length)].map(() => this.getArrayItem(schema, output, filter));
Avoid too many return
statements within this function. Open
Open
return null;