@janiscommerce/active-client
Advanced tools
Comparing version 1.1.1 to 1.2.0
@@ -8,2 +8,6 @@ # Changelog | ||
## [1.2.0] - 2019-07-18 | ||
### Added | ||
- `getInstance` with client propagation | ||
## [1.1.1] - 2019-07-15 | ||
@@ -10,0 +14,0 @@ ### Changed |
@@ -15,7 +15,19 @@ 'use strict'; | ||
if(client) | ||
client.getInstance = this.getInstance(client); | ||
return client; | ||
} | ||
static getInstance(client) { | ||
return TheClass => { | ||
const instance = new TheClass(); | ||
instance.client = client; | ||
return instance; | ||
}; | ||
} | ||
} | ||
module.exports = ActiveClient; |
{ | ||
"name": "@janiscommerce/active-client", | ||
"version": "1.1.1", | ||
"description": "", | ||
"version": "1.2.0", | ||
"description": "A simple module for getting an Active Client from a field and a value", | ||
"main": "index.js", | ||
@@ -6,0 +6,0 @@ "scripts": { |
@@ -6,3 +6,3 @@ # active-client | ||
**ActiveClient** is a simple module for getting a client from a field and a value. | ||
**ActiveClient** is a simple module for getting an Active Client from a field and a value. | ||
The module only has one method and a Model for the get. | ||
@@ -9,0 +9,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4702
51