5e8f5dbcfb2ed0681f4dd26b05f876a536577438db07b15f95b4a222b695f579e3c9e1b1e0290590c6e23df1ca6b61fc12929d43d49fb0e8fe90e6da862b87 494 B

1234567891011121314151617181920
  1. 'use strict';
  2. var supportsDescriptors = require('has-property-descriptors')();
  3. var defineDataProperty = require('define-data-property');
  4. var getPolyfill = require('./polyfill');
  5. module.exports = function shimStringTrim() {
  6. var polyfill = getPolyfill();
  7. if (String.prototype.trim !== polyfill) {
  8. if (supportsDescriptors) {
  9. defineDataProperty(String.prototype, 'trim', polyfill, true);
  10. } else {
  11. defineDataProperty(String.prototype, 'trim', polyfill);
  12. }
  13. }
  14. return polyfill;
  15. };