analytics.js
function currency(val) {
  if (!val) return;
  if (typeof val === 'number') return val;
  if (typeof val !== 'string') return;

  val = val.replace(/\$/g, '');
  val = parseFloat(val);

  if (!isNaN(val)) return val;
}
function currency(val) {
  if (!val) return;
  if (typeof val === 'number') return val;
  if (typeof val !== 'string') return;

  val = val.replace(/\$/g, '');
  val = parseFloat(val);

  if (!isNaN(val)) return val;
}
function currency ( val ) { if ( ! val ) return ; if ( typeof val === 'number' ) return val ; if ( typeof val !== 'string' ) return ; val = val . replace ( / \$ / g , '' ) ; val = parseFloat ( val ) ; if ( ! isNaN ( val ) ) return val ; }
Get float from currency value.

@param {Mixed} val
@return {Number}
Get float from currency value .