Skip to content

Commit 7d013e6

Browse files
wip(utils.server): use json-bigint-patch for now
Replace `json-bigint` until sidorares/json-bigint#77 is merged.
1 parent 0098e28 commit 7d013e6

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

app/utils.server.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import JSONBig from 'json-bigint';
1+
import 'json-bigint-patch';
22
import type { Session } from 'remix';
33
import { autoLink } from 'twitter-text';
44
import invariant from 'tiny-invariant';
@@ -9,9 +9,12 @@ import { commitSession, getSession } from '~/session.server';
99

1010
export { nanoid } from 'nanoid';
1111

12-
const DEFAULT_REDIRECT = '/rekt/crypto/articles';
12+
// Provided by `json-bigint-patch` which augments the global `JSON` methods.
13+
// @see {@link https://github.com/ardatan/json-bigint-patch/blob/master/src/index.js}
14+
// @see {@link https://github.com/sidorares/json-bigint/issues/74}
15+
export const { parse, stringify } = JSON;
1316

14-
export const { parse, stringify } = JSONBig({ useNativeBigInt: true });
17+
const DEFAULT_REDIRECT = '/rekt/crypto/articles';
1518

1619
export function html(text: string): string {
1720
return autoLink(text, {

0 commit comments

Comments
 (0)