https://github.com/thinkjs/think-instance
get class instance
https://github.com/thinkjs/think-instance
Last synced: about 1 year ago
JSON representation
get class instance
- Host: GitHub
- URL: https://github.com/thinkjs/think-instance
- Owner: thinkjs
- License: mit
- Created: 2017-04-26T07:52:44.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2021-06-30T23:04:21.000Z (almost 5 years ago)
- Last Synced: 2025-03-17T14:18:25.891Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 12
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# think-instance
[](https://travis-ci.org/thinkjs/think-instance)
[](https://coveralls.io/github/thinkjs/think-instance)
[](https://www.npmjs.com/package/think-instance)
## Install
```
npm install think-instance
```
## How to Use
```js
const thinkInstance = require('think-instance');
let cls = class {
constructor(conf1, conf2){
}
}
cls = thinkInstance(cls);
const instance = cls.getInstance(conf1, conf2);
```