Skip to content

Commit

Permalink
adds BigInt example to the storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
AnyRoad committed Sep 3, 2023
1 parent 6f915f3 commit 63c7df1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/stories/JsonView.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,15 @@ export default {

const Template: StoryFn<typeof JsonView> = (args) => <JsonView {...args} />;

// eslint-disable-next-line no-extend-native
BigInt.prototype.toJSON = function () {
return this.toString();
};

const jsonData = {
'string property': 'my string',
'': 'empty name property',
'bigint property': BigInt('9007199254740991'),
'number property': 42.42,
'boolean property': true,
'null property': null,
Expand Down

0 comments on commit 63c7df1

Please sign in to comment.