index.js
function decimalLength(n) {
	let ns = cleanNumber(n).toString();
	let ems = ns.match(/e([\+\-]\d+)$/);
	let e = 0;
	if (ems && ems[1]) e = parseInt(ems[1]);
	ns = ns.replace(/e[\-\+]\d+$/, '');	
	let parts = ns.split('.', 2);
	if (parts.length === 1) return -e;
	return parts[1].length - e;
}
function decimalLength(n) {
	let ns = cleanNumber(n).toString();
	let ems = ns.match(/e([\+\-]\d+)$/);
	let e = 0;
	if (ems && ems[1]) e = parseInt(ems[1]);
	ns = ns.replace(/e[\-\+]\d+$/, '');	
	let parts = ns.split('.', 2);
	if (parts.length === 1) return -e;
	return parts[1].length - e;
}
function decimalLength ( n ) { let ns = cleanNumber ( n ) . toString ( ) ; let ems = ns . match ( / e([\+\-]\d+)$ / ) ; let e = 0 ; if ( ems && ems [ 1 ] ) e = parseInt ( ems [ 1 ] ) ; ns = ns . replace ( / e[\-\+]\d+$ / , '' ) ; let parts = ns . split ( '.' , 2 ) ; if ( parts . length === 1 ) return - e ; return parts [ 1 ] . length - e ; }
calculate the decimal part length of a number
calculate the decimal part length of a number