mirror of
https://github.com/borbann-platform/srs-document.git
synced 2025-12-20 04:54:06 +01:00
22 lines
529 B
JavaScript
22 lines
529 B
JavaScript
'use strict';
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.default = {
|
|
objectCopy: function objectCopy(obj) {
|
|
if (typeof obj === 'undefined') {
|
|
return {};
|
|
}
|
|
return JSON.parse(JSON.stringify(obj));
|
|
},
|
|
stringify: function stringify(obj) {
|
|
var spacer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
|
|
|
|
if (typeof obj === 'undefined') {
|
|
return '';
|
|
}
|
|
return JSON.stringify(obj, null, spacer);
|
|
}
|
|
};
|
|
module.exports = exports['default']; |