planck-js
Version:
2D JavaScript physics engine for cross-platform HTML5 game development
13 lines (12 loc) • 424 B
JavaScript
var _DEBUG = typeof DEBUG === 'undefined' ? false : DEBUG;
var _ASSERT = typeof ASSERT === 'undefined' ? false : ASSERT;
exports.toString = function(newline) {
newline = typeof newline === 'string' ? newline : '\n';
var string = "";
for (var name in this) {
if (typeof this[name] !== 'function' && typeof this[name] !== 'object') {
string += name + ': ' + this[name] + newline;
}
}
return string;
};