Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Utils.JSON.stringify = function(obj, options, callback) {
let replacer = null;
let str = null;
options = options || {};
if(isFunction(options.replacer)) {
replacer = options.replacer;
}
try {
str = JSONstringify.apply(JSON, compact([obj, replacer]));
} catch(err) {
return callback(err);
}
callback(null, str);
};
exports.stringify = function ( json, serializer, indent, decycler ) {
var args = Array.prototype.slice.call(arguments);
try {
return safeStringify.apply(this, args);
}
catch (e) {
return false;
}
};
Utils.JSON.stringify = function(obj, options, callback) {
var replacer = null;
var str = null;
options = options || {};
if(_.isFunction(options.replacer)) {
replacer = options.replacer;
}
try {
str = JSONstringify.apply(JSON, _.compact([obj, replacer]));
} catch(err) {
return callback(err);
}
callback(null, str);
};
exports.stringify = function ( json, serializer, indent, decycler ) {
var args = Array.prototype.slice.call(arguments);
try {
return safeStringify.apply(this, args);
}
catch (e) {
return false;
}
};
exports.stringify = function ( json, serializer, indent, decycler ) {
var args = Array.prototype.slice.call(arguments);
try {
return safeStringify.apply(this, args);
}
catch (e) {
return false;
}
};