es6.object.freeze.js 267 B

123456789
  1. // 19.1.2.5 Object.freeze(O)
  2. var isObject = require('./_is-object');
  3. var meta = require('./_meta').onFreeze;
  4. require('./_object-sap')('freeze', function ($freeze) {
  5. return function freeze(it) {
  6. return $freeze && isObject(it) ? $freeze(meta(it)) : it;
  7. };
  8. });