UNPKG

@nestjs/core

Version:

The core of NestJS, a TypeScript framework for Node.js backends: modules, dependency injection and the request pipeline, on Express, Fastify or node:http.

12 lines (11 loc) • 362 B
import { isUndefined } from '@nestjs/common/internal'; export function isClassProvider(provider) { return Boolean(provider?.useClass); } export function isValueProvider(provider) { const providerValue = provider?.useValue; return !isUndefined(providerValue); } export function isFactoryProvider(provider) { return Boolean(provider.useFactory); }