5757
5858 < a class ='nav-title ' href ="# "> API</ a >
5959 < select id ="version " name ="version " onchange ="location.href=this.value;this.selectedIndex=0 ">
60- < option value ="" selected > v6.0.1 </ option >
60+ < option value ="" selected > v6.0.x </ option >
6161 < option value ="legacy/v5.2.x.html "> v5.2.x</ option >
6262 < option value ="legacy/v5.1.x.html "> v5.1.x</ option >
6363 < option value ="legacy/v5.0.x.html "> v5.0.x</ option >
105105 < li > < a href ="#times " > times</ a > </ li >
106106 < li > < a href ="#toE " > toExponential</ a > </ li >
107107 < li > < a href ="#toF " > toFixed</ a > </ li >
108+ < li > < a href ="#toJSON " > toJSON</ a > </ li >
108109 < li > < a href ="#toN " > toNumber</ a > </ li >
109110 < li > < a href ="#toP " > toPrecision</ a > </ li >
110111 < li > < a href ="#toS " > toString</ a > </ li >
111112 < li > < a href ="#valueOf "> valueOf</ a > </ li >
112- < li > < a href ="#toJSON " > toJSON</ a > </ li >
113113 </ ul >
114114
115115 < a href ="#instance-properties "> Properties</ a >
@@ -817,6 +817,21 @@ <h5 id="toF">
817817
818818
819819
820+ < h5 id ="toJSON ">
821+ toJSON< code class ='inset '> .toJSON() < i > ⇒ string</ i > </ code >
822+ </ h5 >
823+ < p > As < a href ='#toS '> < code > toString</ code > </ a > .</ p >
824+ < pre >
825+ x = new Big('177.7e+457')
826+ y = new Big(235.4325)
827+ z = new Big('0.0098074')
828+ str = JSON.stringify( [x, y, z] )
829+
830+ JSON.parse(str, function (k, v) { return k === '' ? v : new Big(v) })
831+ // Returns an array of three Big numbers.</ pre >
832+
833+
834+
820835 < h5 id ="toP ">
821836 toPrecision< code class ='inset '> .toPrecision(sd) ⇒
822837 < i > string</ i > </ code >
@@ -911,7 +926,8 @@ <h5 id="valueOf">
911926 valueOf< code class ='inset '> .valueOf() < i > ⇒ string</ i > </ code >
912927 </ h5 >
913928 < p >
914- As < code > toString</ code > except the minus sign is included for negative zero.
929+ As < a href ='#toS '> < code > toString</ code > </ a > except the minus sign is
930+ included for negative zero.
915931 </ p >
916932 < pre >
917933x = new Big(-0)
@@ -925,24 +941,6 @@ <h5 id="valueOf">
925941
926942
927943
928- < h5 id ="toJSON ">
929- toJSON< code class ='inset '> .toJSON() < i > ⇒ string</ i > </ code >
930- </ h5 >
931- < p >
932- Returns a string representing the value of this Big number in exponential
933- notation. The minus sign is included for negative zero.
934- </ p >
935- < pre >
936- x = new Big('177.7e+457')
937- y = new Big(235.4325)
938- z = new Big('0.0098074')
939- str = JSON.stringify( [x, y, z] )
940-
941- JSON.parse(str, function (k, v) { return k === '' ? v : new Big(v) })
942- // Returns an array of three Big numbers.</ pre >
943-
944-
945-
946944 < h4 id ="instance-properties "> Properties</ h4 >
947945 < p >
948946 A Big number is an object with three properties:
0 commit comments