source: imaps-frontend/node_modules/string.prototype.trim/shim.js

main
Last change on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 6 months ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 494 bytes
Line 
1'use strict';
2
3var supportsDescriptors = require('has-property-descriptors')();
4var defineDataProperty = require('define-data-property');
5
6var getPolyfill = require('./polyfill');
7
8module.exports = function shimStringTrim() {
9 var polyfill = getPolyfill();
10
11 if (String.prototype.trim !== polyfill) {
12 if (supportsDescriptors) {
13 defineDataProperty(String.prototype, 'trim', polyfill, true);
14 } else {
15 defineDataProperty(String.prototype, 'trim', polyfill);
16 }
17 }
18
19 return polyfill;
20};
Note: See TracBrowser for help on using the repository browser.