@inversifyjs/common
Version:
InversifyJs common utils
3 lines (2 loc) • 593 B
JavaScript
function e(e){return("object"==typeof e&&null!==e||"function"==typeof e)&&"function"==typeof e.then}function t(e){switch(typeof e){case"string":case"symbol":return e.toString();case"function":return e.name;default:throw new Error(`Unexpected ${typeof e} service id type`)}}const n=Symbol.for("@inversifyjs/common/islazyServiceIdentifier");class r{[n];#e;constructor(e){this.#e=e,this[n]=!0}static is(e){return"object"==typeof e&&null!==e&&!0===e[n]}unwrap(){return this.#e()}}export{r as LazyServiceIdentifier,e as isPromise,t as stringifyServiceIdentifier};
//# sourceMappingURL=index.js.map