1
2
3
4
5
6
7
8
9
10
11
12
13
14
| var keys = require('./keys');
| exports = function(obj) {
| if (Object.freeze) return Object.freeze(obj);
| keys(obj).forEach(function(prop) {
| if (!Object.getOwnPropertyDescriptor(obj, prop).configurable) return;
| Object.defineProperty(obj, prop, {
| writable: false,
| configurable: false
| });
| });
| return obj;
| };
|
| module.exports = exports;
|
|