Travis build: 313

This commit is contained in:
30secondsofcode
2018-09-01 10:09:50 +00:00
parent 1fe1d4318b
commit cb98d837b2
13 changed files with 55 additions and 14 deletions

View File

@ -8,9 +8,7 @@ Calls `Object.freeze(obj)` recursively on all unfrozen properties of passed obje
const deepFreeze = obj =>
Object.keys(obj).forEach(
prop =>
!obj[prop] instanceof Object || Object.isFrozen(obj[prop])
? null
: deepFreeze(obj[prop])
!obj[prop] instanceof Object || Object.isFrozen(obj[prop]) ? null : deepFreeze(obj[prop])
) || Object.freeze(obj);
```