You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

polyfill.js 322B

1234567891011121314
  1. 'use strict';
  2. var implementation = require('./implementation');
  3. module.exports = function getPolyfill() {
  4. if (!String.prototype.trimLeft) {
  5. return implementation;
  6. }
  7. var zeroWidthSpace = '\u200b';
  8. if (zeroWidthSpace.trimLeft() !== zeroWidthSpace) {
  9. return implementation;
  10. }
  11. return String.prototype.trimLeft;
  12. };