delete-property-or-throw.js 247 B

12345678
  1. 'use strict';
  2. var tryToString = require('../internals/try-to-string');
  3. var $TypeError = TypeError;
  4. module.exports = function (O, P) {
  5. if (!delete O[P]) throw $TypeError('Cannot delete property ' + tryToString(P) + ' of ' + tryToString(O));
  6. };