@@ -40,6 +40,7 @@ <h3 class="tsd-index-heading">Constructors</h3>
40
40
< section class ="tsd-index-section ">
41
41
< h3 class ="tsd-index-heading "> Properties</ h3 >
42
42
< div class ="tsd-index-list "> < a href ="BSON.Decimal128.html#bytes " class ="tsd-index-link tsd-is-external "> < svg class ="tsd-kind-icon " viewBox ="0 0 24 24 "> < g id ="icon-1024 "> < rect fill ="var(--color-icon-background) " stroke ="#FF984D " stroke-width ="1.5 " x ="1 " y ="1 " width ="22 " height ="22 " rx ="12 "> </ rect > < path d ="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z " fill ="var(--color-text) "> </ path > </ g > </ svg > < span > bytes</ span > </ a >
43
+ < a href ="BSON.Decimal128.html#_fromString " class ="tsd-index-link tsd-is-private tsd-is-external "> < svg class ="tsd-kind-icon " viewBox ="0 0 24 24 "> < use href ="#icon-1024 "> </ use > </ svg > < span > _from< wbr /> String</ span > </ a >
43
44
</ div > </ section >
44
45
< section class ="tsd-index-section ">
45
46
< h3 class ="tsd-index-heading "> Accessors</ h3 >
@@ -51,6 +52,7 @@ <h3 class="tsd-index-heading">Methods</h3>
51
52
< a href ="BSON.Decimal128.html#toJSON " class ="tsd-index-link tsd-is-external "> < svg class ="tsd-kind-icon " viewBox ="0 0 24 24 "> < use href ="#icon-2048 "> </ use > </ svg > < span > toJSON</ span > </ a >
52
53
< a href ="BSON.Decimal128.html#toString " class ="tsd-index-link tsd-is-external "> < svg class ="tsd-kind-icon " viewBox ="0 0 24 24 "> < use href ="#icon-2048 "> </ use > </ svg > < span > to< wbr /> String</ span > </ a >
53
54
< a href ="BSON.Decimal128.html#fromString " class ="tsd-index-link tsd-is-external "> < svg class ="tsd-kind-icon " viewBox ="0 0 24 24 "> < use href ="#icon-2048 "> </ use > </ svg > < span > from< wbr /> String</ span > </ a >
55
+ < a href ="BSON.Decimal128.html#fromStringWithRounding " class ="tsd-index-link tsd-is-external "> < svg class ="tsd-kind-icon " viewBox ="0 0 24 24 "> < use href ="#icon-2048 "> </ use > </ svg > < span > from< wbr /> String< wbr /> With< wbr /> Rounding</ span > </ a >
54
56
</ div > </ section > </ div > </ details > </ section > </ section >
55
57
< section class ="tsd-panel-group tsd-member-group ">
56
58
< h2 > Constructors</ h2 >
@@ -79,7 +81,12 @@ <h2>Properties</h2>
79
81
< h3 class ="tsd-anchor-link "> < code class ="tsd-tag ts-flagReadonly "> Readonly</ code > < span > bytes</ span > < a href ="#bytes " aria-label ="Permalink " class ="tsd-anchor-icon "> < svg viewBox ="0 0 24 24 "> < use href ="#icon-anchor "> </ use > </ svg > </ a > </ h3 >
80
82
< div class ="tsd-signature "> < span class ="tsd-kind-property "> bytes</ span > < span class ="tsd-signature-symbol "> :</ span > < span class ="tsd-signature-type "> Uint8Array</ span > </ div > < aside class ="tsd-sources ">
81
83
< ul >
82
- < li > Defined in node_modules/bson/bson.d.ts:372</ li > </ ul > </ aside > </ section > </ section >
84
+ < li > Defined in node_modules/bson/bson.d.ts:372</ li > </ ul > </ aside > </ section >
85
+ < section class ="tsd-panel tsd-member tsd-is-private tsd-is-external "> < a id ="_fromString " class ="tsd-anchor "> </ a >
86
+ < h3 class ="tsd-anchor-link "> < code class ="tsd-tag ts-flagStatic "> Static</ code > < code class ="tsd-tag ts-flagPrivate "> Private</ code > < span > _from< wbr /> String</ span > < a href ="#_fromString " aria-label ="Permalink " class ="tsd-anchor-icon "> < svg viewBox ="0 0 24 24 "> < use href ="#icon-anchor "> </ use > </ svg > </ a > </ h3 >
87
+ < div class ="tsd-signature "> < span class ="tsd-kind-property "> _from< wbr /> String</ span > < span class ="tsd-signature-symbol "> :</ span > < span class ="tsd-signature-type "> any</ span > </ div > < aside class ="tsd-sources ">
88
+ < ul >
89
+ < li > Defined in node_modules/bson/bson.d.ts:403</ li > </ ul > </ aside > </ section > </ section >
83
90
< section class ="tsd-panel-group tsd-member-group ">
84
91
< h2 > Accessors</ h2 >
85
92
< section class ="tsd-panel tsd-member tsd-is-external "> < a id ="_bsontype " class ="tsd-anchor "> </ a >
@@ -103,15 +110,15 @@ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</s
103
110
< div class ="tsd-comment tsd-typography "> </ div > < aside class ="tsd-sources ">
104
111
< p > Overrides < a href ="BSON.BSONValue.html "> BSONValue</ a > .< a href ="BSON.BSONValue.html#inspect "> inspect</ a > </ p >
105
112
< ul >
106
- < li > Defined in node_modules/bson/bson.d.ts:389 </ li > </ ul > </ aside > </ li > </ ul > </ section >
113
+ < li > Defined in node_modules/bson/bson.d.ts:409 </ li > </ ul > </ aside > </ li > </ ul > </ section >
107
114
< section class ="tsd-panel tsd-member tsd-is-external "> < a id ="toJSON " class ="tsd-anchor "> </ a >
108
115
< h3 class ="tsd-anchor-link "> < span > toJSON</ span > < a href ="#toJSON " aria-label ="Permalink " class ="tsd-anchor-icon "> < svg viewBox ="0 0 24 24 "> < use href ="#icon-anchor "> </ use > </ svg > </ a > </ h3 >
109
116
< ul class ="tsd-signatures tsd-is-external ">
110
117
< li class ="tsd-signature tsd-anchor-link " id ="toJSON.toJSON-1 "> < span class ="tsd-kind-call-signature "> toJSON</ span > < span class ="tsd-signature-symbol "> (</ span > < span class ="tsd-signature-symbol "> )</ span > < span class ="tsd-signature-symbol "> : </ span > < a href ="../interfaces/BSON.Decimal128Extended.html " class ="tsd-signature-type tsd-kind-interface "> Decimal128Extended</ a > < a href ="#toJSON.toJSON-1 " aria-label ="Permalink " class ="tsd-anchor-icon "> < svg viewBox ="0 0 24 24 "> < use href ="#icon-anchor "> </ use > </ svg > </ a > </ li >
111
118
< li class ="tsd-description ">
112
119
< h4 class ="tsd-returns-title "> Returns < a href ="../interfaces/BSON.Decimal128Extended.html " class ="tsd-signature-type tsd-kind-interface "> Decimal128Extended</ a > </ h4 > < aside class ="tsd-sources ">
113
120
< ul >
114
- < li > Defined in node_modules/bson/bson.d.ts:386 </ li > </ ul > </ aside > </ li > </ ul > </ section >
121
+ < li > Defined in node_modules/bson/bson.d.ts:406 </ li > </ ul > </ aside > </ li > </ ul > </ section >
115
122
< section class ="tsd-panel tsd-member tsd-is-external "> < a id ="toString " class ="tsd-anchor "> </ a >
116
123
< h3 class ="tsd-anchor-link "> < span > to< wbr /> String</ span > < a href ="#toString " aria-label ="Permalink " class ="tsd-anchor-icon "> < svg viewBox ="0 0 24 24 "> < use href ="#icon-anchor "> </ use > </ svg > </ a > </ h3 >
117
124
< ul class ="tsd-signatures tsd-is-external ">
@@ -122,7 +129,7 @@ <h3 class="tsd-anchor-link"><span>to<wbr/>String</span><a href="#toString" aria-
122
129
< h4 class ="tsd-returns-title "> Returns < span class ="tsd-signature-type "> string</ span > </ h4 >
123
130
< div class ="tsd-comment tsd-typography "> </ div > < aside class ="tsd-sources ">
124
131
< ul >
125
- < li > Defined in node_modules/bson/bson.d.ts:385 </ li > </ ul > </ aside > </ li > </ ul > </ section >
132
+ < li > Defined in node_modules/bson/bson.d.ts:405 </ li > </ ul > </ aside > </ li > </ ul > </ section >
126
133
< section class ="tsd-panel tsd-member tsd-is-external "> < a id ="fromString " class ="tsd-anchor "> </ a >
127
134
< h3 class ="tsd-anchor-link "> < code class ="tsd-tag ts-flagStatic "> Static</ code > < span > from< wbr /> String</ span > < a href ="#fromString " aria-label ="Permalink " class ="tsd-anchor-icon "> < svg viewBox ="0 0 24 24 "> < use href ="#icon-anchor "> </ use > </ svg > </ a > </ h3 >
128
135
< ul class ="tsd-signatures tsd-is-external ">
@@ -141,7 +148,31 @@ <h5><span class="tsd-kind-parameter">representation</span>: <span class="tsd-sig
141
148
< h4 class ="tsd-returns-title "> Returns < a href ="BSON.Decimal128.html " class ="tsd-signature-type tsd-kind-class "> Decimal128</ a > </ h4 >
142
149
< div class ="tsd-comment tsd-typography "> </ div > < aside class ="tsd-sources ">
143
150
< ul >
144
- < li > Defined in node_modules/bson/bson.d.ts:383</ li > </ ul > </ aside > </ li > </ ul > </ section > </ section > </ div >
151
+ < li > Defined in node_modules/bson/bson.d.ts:383</ li > </ ul > </ aside > </ li > </ ul > </ section >
152
+ < section class ="tsd-panel tsd-member tsd-is-external "> < a id ="fromStringWithRounding " class ="tsd-anchor "> </ a >
153
+ < h3 class ="tsd-anchor-link "> < code class ="tsd-tag ts-flagStatic "> Static</ code > < span > from< wbr /> String< wbr /> With< wbr /> Rounding</ span > < a href ="#fromStringWithRounding " aria-label ="Permalink " class ="tsd-anchor-icon "> < svg viewBox ="0 0 24 24 "> < use href ="#icon-anchor "> </ use > </ svg > </ a > </ h3 >
154
+ < ul class ="tsd-signatures tsd-is-external ">
155
+ < li class ="tsd-signature tsd-anchor-link " id ="fromStringWithRounding.fromStringWithRounding-1 "> < span class ="tsd-kind-call-signature "> from< wbr /> String< wbr /> With< wbr /> Rounding</ span > < span class ="tsd-signature-symbol "> (</ span > < span class ="tsd-kind-parameter "> representation</ span > < span class ="tsd-signature-symbol "> )</ span > < span class ="tsd-signature-symbol "> : </ span > < a href ="BSON.Decimal128.html " class ="tsd-signature-type tsd-kind-class "> Decimal128</ a > < a href ="#fromStringWithRounding.fromStringWithRounding-1 " aria-label ="Permalink " class ="tsd-anchor-icon "> < svg viewBox ="0 0 24 24 "> < use href ="#icon-anchor "> </ use > </ svg > </ a > </ li >
156
+ < li class ="tsd-description ">
157
+ < div class ="tsd-comment tsd-typography "> < p > Create a Decimal128 instance from a string representation, allowing for rounding to 34
158
+ significant digits</ p >
159
+ </ div >
160
+ < div class ="tsd-parameters ">
161
+ < h4 class ="tsd-parameters-title "> Parameters</ h4 >
162
+ < ul class ="tsd-parameter-list ">
163
+ < li >
164
+ < h5 > < span class ="tsd-kind-parameter "> representation</ span > : < span class ="tsd-signature-type "> string</ span > </ h5 >
165
+ < div class ="tsd-comment tsd-typography "> < p > a numeric string representation.</ p >
166
+ </ div >
167
+ < div class ="tsd-comment tsd-typography "> </ div > </ li > </ ul > </ div >
168
+ < h4 class ="tsd-returns-title "> Returns < a href ="BSON.Decimal128.html " class ="tsd-signature-type tsd-kind-class "> Decimal128</ a > </ h4 >
169
+ < div class ="tsd-comment tsd-typography ">
170
+ < h4 > Example</ h4 > < p > Example of a number that will be rounded</ p >
171
+ < pre > < code class ="language-ts "> < span class ="hl-1 "> > </ span > < span class ="hl-4 "> let</ span > < span class ="hl-1 "> </ span > < span class ="hl-6 "> d</ span > < span class ="hl-1 "> = </ span > < span class ="hl-6 "> Decimal128</ span > < span class ="hl-1 "> .</ span > < span class ="hl-0 "> fromString</ span > < span class ="hl-1 "> (</ span > < span class ="hl-2 "> '37.499999999999999196428571428571375'</ span > < span class ="hl-1 "> )</ span > < br /> < span class ="hl-10 "> Uncaught</ span > < span class ="hl-1 "> :</ span > < br /> < span class ="hl-10 "> BSONError</ span > < span class ="hl-1 "> : </ span > < span class ="hl-2 "> "37.499999999999999196428571428571375"</ span > < span class ="hl-1 "> </ span > < span class ="hl-6 "> is</ span > < span class ="hl-1 "> </ span > < span class ="hl-6 "> not</ span > < span class ="hl-1 "> </ span > < span class ="hl-6 "> a</ span > < span class ="hl-1 "> </ span > < span class ="hl-6 "> valid</ span > < span class ="hl-1 "> </ span > < span class ="hl-6 "> Decimal128</ span > < span class ="hl-1 "> </ span > < span class ="hl-6 "> string</ span > < span class ="hl-1 "> - </ span > < span class ="hl-6 "> inexact</ span > < span class ="hl-1 "> </ span > < span class ="hl-6 "> rounding</ span > < br /> < span class ="hl-6 "> at</ span > < span class ="hl-1 "> </ span > < span class ="hl-0 "> invalidErr</ span > < span class ="hl-1 "> (/</ span > < span class ="hl-6 "> home</ span > < span class ="hl-1 "> /</ span > < span class ="hl-6 "> wajames</ span > < span class ="hl-1 "> /</ span > < span class ="hl-6 "> js</ span > < span class ="hl-1 "> -</ span > < span class ="hl-6 "> bson</ span > < span class ="hl-1 "> /</ span > < span class ="hl-6 "> lib</ span > < span class ="hl-1 "> /</ span > < span class ="hl-6 "> bson</ span > < span class ="hl-1 "> .</ span > < span class ="hl-6 "> cjs</ span > < span class ="hl-1 "> :</ span > < span class ="hl-8 "> 1402</ span > < span class ="hl-1 "> :</ span > < span class ="hl-8 "> 11</ span > < span class ="hl-1 "> )</ span > < br /> < span class ="hl-6 "> at</ span > < span class ="hl-1 "> </ span > < span class ="hl-6 "> Decimal128</ span > < span class ="hl-1 "> .</ span > < span class ="hl-0 "> fromStringInternal</ span > < span class ="hl-1 "> (/</ span > < span class ="hl-6 "> home</ span > < span class ="hl-1 "> /</ span > < span class ="hl-6 "> wajames</ span > < span class ="hl-1 "> /</ span > < span class ="hl-6 "> js</ span > < span class ="hl-1 "> -</ span > < span class ="hl-6 "> bson</ span > < span class ="hl-1 "> /</ span > < span class ="hl-6 "> lib</ span > < span class ="hl-1 "> /</ span > < span class ="hl-6 "> bson</ span > < span class ="hl-1 "> .</ span > < span class ="hl-6 "> cjs</ span > < span class ="hl-1 "> :</ span > < span class ="hl-8 "> 1633</ span > < span class ="hl-1 "> :</ span > < span class ="hl-8 "> 25</ span > < span class ="hl-1 "> )</ span > < br /> < span class ="hl-6 "> at</ span > < span class ="hl-1 "> </ span > < span class ="hl-6 "> Decimal128</ span > < span class ="hl-1 "> .</ span > < span class ="hl-0 "> fromString</ span > < span class ="hl-1 "> (/</ span > < span class ="hl-6 "> home</ span > < span class ="hl-1 "> /</ span > < span class ="hl-6 "> wajames</ span > < span class ="hl-1 "> /</ span > < span class ="hl-6 "> js</ span > < span class ="hl-1 "> -</ span > < span class ="hl-6 "> bson</ span > < span class ="hl-1 "> /</ span > < span class ="hl-6 "> lib</ span > < span class ="hl-1 "> /</ span > < span class ="hl-6 "> bson</ span > < span class ="hl-1 "> .</ span > < span class ="hl-6 "> cjs</ span > < span class ="hl-1 "> :</ span > < span class ="hl-8 "> 1424</ span > < span class ="hl-1 "> :</ span > < span class ="hl-8 "> 27</ span > < span class ="hl-1 "> )</ span > < br /> < br /> < span class ="hl-1 "> > </ span > < span class ="hl-6 "> d</ span > < span class ="hl-1 "> = </ span > < span class ="hl-6 "> Decimal128</ span > < span class ="hl-1 "> .</ span > < span class ="hl-0 "> fromStringWithRounding</ span > < span class ="hl-1 "> (</ span > < span class ="hl-2 "> '37.499999999999999196428571428571375'</ span > < span class ="hl-1 "> )</ span > < br /> < span class ="hl-4 "> new</ span > < span class ="hl-1 "> </ span > < span class ="hl-0 "> Decimal128</ span > < span class ="hl-1 "> (</ span > < span class ="hl-2 "> "37.49999999999999919642857142857138"</ span > < span class ="hl-1 "> )</ span >
172
+ </ code > < button > Copy</ button > </ pre >
173
+ </ div > < aside class ="tsd-sources ">
174
+ < ul >
175
+ < li > Defined in node_modules/bson/bson.d.ts:402</ li > </ ul > </ aside > </ li > </ ul > </ section > </ section > </ div >
145
176
< div class ="col-sidebar ">
146
177
< div class ="page-menu ">
147
178
< div class ="tsd-navigation settings ">
@@ -163,11 +194,13 @@ <h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="#icon
163
194
< ul >
164
195
< li > < a href ="#constructor " class ="tsd-is-external "> < svg class ="tsd-kind-icon " viewBox ="0 0 24 24 "> < use href ="#icon-512 "> </ use > </ svg > < span > constructor</ span > </ a > </ li >
165
196
< li > < a href ="#bytes " class ="tsd-is-external "> < svg class ="tsd-kind-icon " viewBox ="0 0 24 24 "> < use href ="#icon-1024 "> </ use > </ svg > < span > bytes</ span > </ a > </ li >
197
+ < li > < a href ="#_fromString " class ="tsd-is-private tsd-is-external "> < svg class ="tsd-kind-icon " viewBox ="0 0 24 24 "> < use href ="#icon-1024 "> </ use > </ svg > < span > _from< wbr /> String</ span > </ a > </ li >
166
198
< li > < a href ="#_bsontype " class ="tsd-is-external "> < svg class ="tsd-kind-icon " viewBox ="0 0 24 24 "> < use href ="#icon-262144 "> </ use > </ svg > < span > _bsontype</ span > </ a > </ li >
167
199
< li > < a href ="#inspect " class ="tsd-is-external "> < svg class ="tsd-kind-icon " viewBox ="0 0 24 24 "> < use href ="#icon-2048 "> </ use > </ svg > < span > inspect</ span > </ a > </ li >
168
200
< li > < a href ="#toJSON " class ="tsd-is-external "> < svg class ="tsd-kind-icon " viewBox ="0 0 24 24 "> < use href ="#icon-2048 "> </ use > </ svg > < span > toJSON</ span > </ a > </ li >
169
201
< li > < a href ="#toString " class ="tsd-is-external "> < svg class ="tsd-kind-icon " viewBox ="0 0 24 24 "> < use href ="#icon-2048 "> </ use > </ svg > < span > to< wbr /> String</ span > </ a > </ li >
170
- < li > < a href ="#fromString " class ="tsd-is-external "> < svg class ="tsd-kind-icon " viewBox ="0 0 24 24 "> < use href ="#icon-2048 "> </ use > </ svg > < span > from< wbr /> String</ span > </ a > </ li > </ ul > </ div > </ details > </ div >
202
+ < li > < a href ="#fromString " class ="tsd-is-external "> < svg class ="tsd-kind-icon " viewBox ="0 0 24 24 "> < use href ="#icon-2048 "> </ use > </ svg > < span > from< wbr /> String</ span > </ a > </ li >
203
+ < li > < a href ="#fromStringWithRounding " class ="tsd-is-external "> < svg class ="tsd-kind-icon " viewBox ="0 0 24 24 "> < use href ="#icon-2048 "> </ use > </ svg > < span > from< wbr /> String< wbr /> With< wbr /> Rounding</ span > </ a > </ li > </ ul > </ div > </ details > </ div >
171
204
< div class ="site-menu ">
172
205
< nav class ="tsd-navigation "> < a href ="../modules.html "> < svg class ="tsd-kind-icon " viewBox ="0 0 24 24 "> < g id ="icon-4 "> < rect fill ="var(--color-icon-background) " stroke ="var(--color-ts-namespace) " stroke-width ="1.5 " x ="1 " y ="1 " width ="22 " height ="22 " rx ="6 "> </ rect > < path d ="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z " fill ="var(--color-text) "> </ path > </ g > </ svg > < span > mongodb</ span > </ a >
173
206
< ul class ="tsd-small-nested-navigation ">
0 commit comments