di-singleton
Version:
Wraps a class constructor to ensure only one instance is created, using lazy initialization and optionally calling an init method if present, while maintaining type safety via TypeScript generics.
64 lines (63 loc) • 1.79 kB
JSON
{
"name": "di-singleton",
"version": "1.0.5",
"description": "Wraps a class constructor to ensure only one instance is created, using lazy initialization and optionally calling an init method if present, while maintaining type safety via TypeScript generics.",
"author": {
"name": "Petr Tripolsky",
"email": "tripolskypetr@gmail.com",
"url": "https://github.com/tripolskypetr"
},
"funding": {
"type": "individual",
"url": "http://paypal.me/tripolskypetr"
},
"license": "MIT",
"homepage": "https://react-declarative-playground.github.io",
"keywords": [
"dependency-injection",
"performance",
"optimization",
"oop",
"lazy-loading",
"optimization-algorithms",
"instantiation",
"activator"
],
"files": [
"build",
"types.d.ts",
"README.md"
],
"repository": {
"type": "git",
"url": "https://github.com/react-declarative/react-declarative",
"documentation": "https://github.com/react-declarative/react-declarative/tree/master/docs"
},
"bugs": {
"url": "https://github.com/react-declarative/react-declarative/issues"
},
"scripts": {
"build": "rollup -c"
},
"main": "build/index.cjs",
"module": "build/index.mjs",
"source": "src/index.ts",
"types": "./types.d.ts",
"exports": {
"require": "./build/index.cjs",
"types": "./types.d.ts",
"import": "./build/index.mjs",
"default": "./build/index.cjs"
},
"devDependencies": {
"@rollup/plugin-typescript": "11.1.6",
"@types/node": "22.9.0",
"rollup": "3.29.4",
"rollup-plugin-dts": "6.1.1",
"rollup-plugin-peer-deps-external": "2.2.4",
"tslib": "2.7.0"
},
"peerDependencies": {
"typescript": "^5.0.0"
}
}