UNPKG

ts-ioc-container

Version:

Fast, lightweight TypeScript dependency injection container with a clean API, scoped lifecycles, decorators, tokens, hooks, lazy injection, customizable providers, and no global container objects.

14 lines (13 loc) 580 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Is = void 0; exports.resolveConstructor = resolveConstructor; exports.Is = { nullish: (value) => value === undefined || value === null, object: (target) => target !== null && typeof target === 'object', instance: (target) => Object.prototype.hasOwnProperty.call(target, 'constructor'), constructor: (target) => typeof target === 'function' && !!target.prototype, }; function resolveConstructor(target) { return exports.Is.constructor(target) ? target : target.constructor; }