Skip to content

Commit 574b585

Browse files
committed
add support for json.stringify replacers
1 parent 7cc3fcb commit 574b585

File tree

6 files changed

+237
-140
lines changed

6 files changed

+237
-140
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html)
66

7+
## [1.2.0]  (2019-10-06)
8+
9+
### Added
10+
11+
- Support for JSON.stringify replacer in the API success response method
12+
713
## [1.1.4]  (2019-09-10)
814

915
### Added
@@ -90,6 +96,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/),
9096
- Update older libraries
9197
- Now publish from Git tags instead of master pushes
9298

99+
[1.2.0]: https://github.com/manwaring/lambda-wrapper/compare/v1.1.4...v1.2.0
93100
[1.1.4]: https://github.com/manwaring/lambda-wrapper/compare/v1.1.3...v1.1.4
94101
[1.1.3]: https://github.com/manwaring/lambda-wrapper/compare/v1.1.2...v1.1.3
95102
[1.1.2]: https://github.com/manwaring/lambda-wrapper/compare/v1.1.1...v1.1.2

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ interface ApiSignature {
8989
headers: { [name: string]: string }; // headers param payload as key-value pairs
9090
testRequest: boolean; // indicates if this is a test request, based on presence of headers matching 'Test-Request' or process.env.TEST_REQUEST_HEADER
9191
auth: any; // auth context from custom authorizer
92-
success(payload?: any): void; // returns 200 status with payload
92+
success(payload?: any, replacer?: (this: any, key: string, value: any) => any): void; // returns 200 status with payload
9393
invalid(errors?: string[]): void; // returns 400 status with errors
9494
redirect(url: string): void; // returns 302 redirect with new url
9595
error(error?: any): void; // returns 500 status with error

0 commit comments

Comments
 (0)