Travis build: 342 [cron]

This commit is contained in:
30secondsofcode
2018-09-01 20:05:19 +00:00
parent fc2a6dc816
commit 8e60551a23
4 changed files with 1664 additions and 1660 deletions

View File

@ -1,17 +1,6 @@
const deepFreeze = obj => {
Object.freeze(obj);
Object.getOwnPropertyNames(obj).forEach(function(prop) {
if (
obj.hasOwnProperty(prop) &&
obj[prop] !== null &&
(typeof obj[prop] === 'object' || typeof obj[prop] === 'function') &&
!Object.isFrozen(obj[prop])
) {
deepFreeze(obj[prop]);
}
});
return obj;
};
const deepFreeze = obj =>
Object.keys(obj).forEach(
prop =>
!obj[prop] instanceof Object || Object.isFrozen(obj[prop]) ? null : deepFreeze(obj[prop])
) || Object.freeze(obj);
module.exports = deepFreeze;

File diff suppressed because it is too large Load Diff