UNPKG

@nestjs/swagger

Version:

OpenAPI for NestJS: generate the API document from controllers and decorators, serve Swagger UI, and derive request types with mapped types.

6 lines (5 loc) • 180 B
import isEmpty from 'es-toolkit/compat/isEmpty'; import uniq from 'es-toolkit/compat/uniq'; export function mergeAndUniq(a = [], b = []) { return uniq((isEmpty(b) ? a : b)); }