Plato on Github
Report Home
serialize.js
Maintainability
131.00
Lines of code
28
Difficulty
12.57
Estimated Errors
0.09
Function weight
By Complexity
By SLOC
define('lyria/serialize', ['jquery'], function($) { /** * * @param {Object} anyObject * * @returns {String} */ var serialize = function(anyObject) { if (( typeof anyObject !== 'object') || ( anyObject instanceof $)) { return; } return JSON.stringify(anyObject, function(key, value) { if (value instanceof $) { return null; } if (typeof value === 'function') { value = value.toString(); } return value; }); }; return serialize; });