Skip to content

Commit

Permalink
refactor: cache serialize
Browse files Browse the repository at this point in the history
  • Loading branch information
DiRaiks committed Sep 15, 2023
1 parent 723caf0 commit 3db0adc
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions packages/sdk/src/common/decorators/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ import { callConsoleMessage } from './utils.js';
const serializeArgs = (args: any[]) =>
args
.map((arg: any) =>
isBigint(arg)
? arg.toString()
: JSON.stringify(arg, (_key, value) => {
return isBigint(value) ? value.toString() : value;
}),
JSON.stringify(arg, (_key, value) => {
return isBigint(value) ? value.toString() : value;
}),
)
.join(':');

Expand Down

0 comments on commit 3db0adc

Please sign in to comment.