Skip to content

Commit

Permalink
Merge pull request #74 from vgenev/feature/#1140-add-isInitiated-method
Browse files Browse the repository at this point in the history
added isInitiated method
  • Loading branch information
mdebarros authored Jan 24, 2020
2 parents 4b10a34 + abe3c28 commit 5bf2fe3
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 9 deletions.
30 changes: 30 additions & 0 deletions audit-resolve.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"decisions": {
"1316|nyc>istanbul-reports>handlebars": {
"decision": "fix",
"madeAt": 1579862904773
},
"1316|typedoc>handlebars": {
"decision": "fix",
"madeAt": 1579862904773
},
"1324|nyc>istanbul-reports>handlebars": {
"decision": "fix",
"madeAt": 1579862904773
},
"1324|typedoc>handlebars": {
"decision": "fix",
"madeAt": 1579862904773
},
"1325|nyc>istanbul-reports>handlebars": {
"decision": "fix",
"madeAt": 1579862904773
},
"1325|typedoc>handlebars": {
"decision": "fix",
"madeAt": 1579862904773
}
},
"rules": {},
"version": 1
}
4 changes: 4 additions & 0 deletions lib/metrics.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,9 @@ declare class Metrics {
* Get the options that are used to setup the prom-client
*/
getOptions: () => metricOptionsType;
/**
* To check is it the Metrics already initiated
*/
isInitiated: () => boolean;
}
export { Metrics, metricOptionsType };
6 changes: 6 additions & 0 deletions lib/metrics.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,12 @@ class Metrics {
this.getOptions = () => {
return this._options
}
/**
* To check is it the Metrics already initiated
*/
this.isInitiated = () => {
return this._alreadySetup
}
}
}
exports.Metrics = Metrics
Expand Down
2 changes: 1 addition & 1 deletion lib/metrics.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mojaloop/central-services-metrics",
"version": "8.3.0",
"version": "8.8.0",
"description": "Shared code for metrics generation",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down
7 changes: 7 additions & 0 deletions src/metrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,13 @@ class Metrics {
getOptions = (): metricOptionsType => {
return this._options
}

/**
* To check is it the Metrics already initiated
*/
isInitiated = (): boolean => {
return this._alreadySetup
}
}

export {
Expand Down

0 comments on commit 5bf2fe3

Please sign in to comment.