UNPKG

@elsikora/cladi

Version:

Zero-dependency TypeScript DI toolkit with typed tokens and scoped lifecycles.

19 lines (16 loc) 660 B
import { MODULE_METADATA_KEY } from '../../constant/module-metadata-key.constant.js'; /** * Reads module decorator metadata from a class constructor. * @param {Constructor<unknown>} target Constructor to inspect. * @returns {IModuleDecoratorOptions | undefined} Stored module metadata. */ function getModuleMetadata(target) { const targetWithMetadata = target; const hasOwnMetadata = Object.prototype.hasOwnProperty.call(targetWithMetadata, MODULE_METADATA_KEY); if (!hasOwnMetadata) { return undefined; } return targetWithMetadata[MODULE_METADATA_KEY]; } export { getModuleMetadata }; //# sourceMappingURL=get.utility.js.map