You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
324 B
13 lines
324 B
var freeze = require('./freeze'); |
|
var keys = require('./keys'); |
|
var isObj = require('./isObj'); |
|
exports = function(obj) { |
|
freeze(obj); |
|
keys(obj).forEach(function(prop) { |
|
var val = obj[prop]; |
|
if (isObj(val) && !Object.isFrozen(val)) exports(val); |
|
}); |
|
return obj; |
|
}; |
|
|
|
module.exports = exports;
|
|
|