artdaq_node_server  v1_00_09
 All Classes Namespaces Files Variables Pages
parseInt.js
1 var root = require('./_root'),
2  toString = require('./toString');
3 
5 var reTrimStart = /^\s+/;
6 
7 /* Built-in method references for those with the same name as other `lodash` methods. */
8 var nativeParseInt = root.parseInt;
9 
34 function parseInt(string, radix, guard) {
35  if (guard || radix == null) {
36  radix = 0;
37  } else if (radix) {
38  radix = +radix;
39  }
40  return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);
41 }
42 
43 module.exports = parseInt;