UNPKG

tagg2

Version:

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

25 lines (21 loc) 660 B
(function () { 'use strict'; //2013-5 write thread.end function var _object_toString = function (object) { if('string' === typeof object) return object; if('number' === typeof object) return object + ''; if('boolean' === typeof object) return object ? 'true' : 'false'; if('function' === typeof object || 'array' === typeof object) return object.toString(); if('undefined' === typeof object) return 'undefined'; if('object' === typeof object) { try{ var obj_str = JSON.stringify(object); } catch(e){ return ""; } return obj_str; } } return _object_toString; })()