Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

Do not know how to serialize a BigInt

function toJson(data) {
    return JSON.stringify(data, (_, v) => typeof v === 'bigint' ? `${v}n` : v)
        .replace(/"(-?d+)n"/g, (_, a) => a);
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: react native rename package name 
Javascript :: javascript get index of object with value in array 
Javascript :: axios not defined 
Javascript :: javascript get object from array where property equals 
Javascript :: javascript absolute value 
Javascript :: store array in local storage js 
Javascript :: SyntaxError: Cannot use import statement outside a module node js 
Javascript :: javascript date get current date 
Javascript :: nvm check version 
Javascript :: discord javascript how to create a role 
Javascript :: on_raw_reaction_add example 
Javascript :: htmlparser2 extract text from html 
Javascript :: use state value change right after setState or state update 
Javascript :: get html lang attribute jquery 
Javascript :: call function after 2 seconds javascript 
Javascript :: getstaticpaths with redux 
Javascript :: nodejs fs directory exists 
Javascript :: javascript create cookie 
Javascript :: first non repeating character javascript 
Javascript :: Uncaught ReferenceError: $localize is not defined angular 
Javascript :: drupal 8 node has field 
Javascript :: input pattern for no whitespaces at the end or beginning 
Javascript :: how to make apk react native 
Javascript :: detect chrome version javascript 
Javascript :: chack var exist for skip error on javascript 
Javascript :: js datetime now 
Javascript :: react js input autocomplete off 
Javascript :: Read only directories in node 
Javascript :: javascript center text 
Javascript :: math.round js 1 decimal 
ADD CONTENT
Topic
Content
Source link
Name
1+9 =