UNPKG

tagg2

Version:

full name is threads_a_gogo2,it is a cross platform support, Simple and fast JavaScript threads for Node.js

17 lines (13 loc) 292 B
module.exports = function(string){ if(string === 'false') return false; else if(string === 'true') return true; else if(string === 'undefined') return; if(isFinite(string)) return string-0; try{ var res = JSON.parse(string) } catch(e){ var res = string; } return res; }