lib/utils.js
function splitDecimal(numStr) {
  var allowNegative = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  var hasNagation = numStr[0] === '-';
  var addNegation = hasNagation && allowNegative;
  numStr = numStr.replace('-', '');
  var parts = numStr.split('.');
  var beforeDecimal = parts[0];
  var afterDecimal = parts[1] || '';
  return {
    beforeDecimal: beforeDecimal,
    afterDecimal: afterDecimal,
    hasNagation: hasNagation,
    addNegation: addNegation
  };
}
function splitDecimal(numStr) {
  var allowNegative = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  var hasNagation = numStr[0] === '-';
  var addNegation = hasNagation && allowNegative;
  numStr = numStr.replace('-', '');
  var parts = numStr.split('.');
  var beforeDecimal = parts[0];
  var afterDecimal = parts[1] || '';
  return {
    beforeDecimal: beforeDecimal,
    afterDecimal: afterDecimal,
    hasNagation: hasNagation,
    addNegation: addNegation
  };
}
function splitDecimal ( numStr ) { var allowNegative = arguments . length > 1 && arguments [ 1 ] !== undefined ? arguments [ 1 ] : true ; var hasNagation = numStr [ 0 ] === '-' ; var addNegation = hasNagation && allowNegative ; numStr = numStr . replace ( '-' , '' ) ; var parts = numStr . split ( '.' ) ; var beforeDecimal = parts [ 0 ] ; var afterDecimal = parts [ 1 ] || '' ; return { beforeDecimal : beforeDecimal , afterDecimal : afterDecimal , hasNagation : hasNagation , addNegation : addNegation } ; }
spilt a float number into different parts beforeDecimal, afterDecimal, and negation
spilt a float number into different parts beforeDecimal afterDecimal and negation