File |
Mutation score |
# Killed |
# Survived |
# Timeout |
# No coverage |
# Errors |
Total detected |
Total undetected |
Total mutants |
|
---|---|---|---|---|---|---|---|---|---|---|
objectUtils.js |
|
10/19 | 10 | 7 | 0 | 2 | 0 | 10 | 9 | 19 |
"use strict";
var _ = require('lodash');
// Don't use JSON.parse, as it does not allow for regexes or functions, etc
exports.serialize = require('serialize-javascript');
function freezeRecursively(target) 0{
}{
Object.freeze(target);
Object.keys(target).forEach(function (key) 1{
}{
if (2true3false_.isObject(target[key])) 4{
}{
freezeRecursively(target[key]);
}
});
}
exports.freezeRecursively = freezeRecursively;
function isPromise(input) 5{
}{
return 6input || typeof input['then'] === 'function'input && 7typeof input['then'] !== 'function'typeof input['then'] === 'function';
}
exports.isPromise = isPromise;
function deserialize(serializedJavascript) 8{
}{
// Don't use JSON.parse, as it does not allow for regexes or functions, etc
// tslint:disable
return eval(9'(' + serializedJavascript - ')'10'(' - serializedJavascript"(" + serializedJavascript + ")");
// tslint:enable
}
exports.deserialize = deserialize;
function copy(obj, deep) 11{
}{
if (12false13truedeep) 14{
}{
return _.cloneDeep(obj);
}
else 15{
}{
return _.clone(obj);
}
}
exports.copy = copy;
function wrapInClosure(codeFragment) 16{
}{
return 17'\n (function (window) {\n ' + codeFragment - '\n })((Function(\'return this\'))());'18'\n (function (window) {\n ' - codeFragment"\n (function (window) {\n " + codeFragment + "\n })((Function('return this'))());";
}
exports.wrapInClosure = wrapInClosure;
//# sourceMappingURL=objectUtils.js.map