1
0
Fork 0

custom toJSON for FoxxContext

this fixes #1898
returns only documented values and hides internal values.
This commit is contained in:
Manuel B 2016-06-27 23:46:59 +02:00 committed by GitHub
parent ecf6885286
commit 1eb49ee6a1
1 changed files with 15 additions and 0 deletions

View File

@ -142,4 +142,19 @@ module.exports = class FoxxContext {
get dependencies() {
return this.service.dependencies;
}
toJSON() {
return {
argv: this.argv,
basePath: this.basePath,
baseUrl: this.baseUrl,
collectionPrefix: this.collectionPrefix,
configuration: this.configuration,
dependencies: this.dependencies,
isDevelopment: this.isDevelopment,
isProduction: this.isProduction,
manifest: this.manifest,
mount: this.mount
};
}
};