File tree Expand file tree Collapse file tree
lib/node_modules/@stdlib/string/format/lib Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121// MODULES //
2222
2323var isUppercase = require ( '@stdlib/assert/is-uppercase' ) ;
24- var isfinite = require ( '@stdlib/math/base/assert/is-finite' ) ;
2524var isNumber = require ( '@stdlib/assert/is-number' ) . isPrimitive ;
2625
2726// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.
@@ -56,7 +55,7 @@ function formatDouble( token ) {
5655 var digits ;
5756 var out ;
5857 var f = parseFloat ( token . arg ) ;
59- if ( ! isfinite ( f ) ) {
58+ if ( ! isFinite ( f ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` to avoid circular dependencies.
6059 if ( ! isNumber ( token . arg ) ) {
6160 throw new Error ( 'invalid floating-point number. Value: ' + out ) ;
6261 }
Original file line number Diff line number Diff line change 2121// MODULES //
2222
2323var isUppercase = require ( '@stdlib/assert/is-uppercase' ) ;
24- var isfinite = require ( '@stdlib/math/base/assert/is-finite' ) ;
2524var isNumber = require ( '@stdlib/assert/is-number' ) . isPrimitive ;
2625var zeroPad = require ( './zero_pad.js' ) ;
2726
@@ -69,7 +68,7 @@ function formatInteger( token ) {
6968 }
7069 out = token . arg ;
7170 i = parseInt ( out , 10 ) ;
72- if ( ! isfinite ( i ) ) {
71+ if ( ! isFinite ( i ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` to avoid circular dependencies.
7372 if ( ! isNumber ( out ) ) {
7473 throw new Error ( 'invalid integer. Value: ' + out ) ;
7574 }
You can’t perform that action at this time.
0 commit comments