polyfill.js
322 Bytes
'use strict';
var implementation = require('./implementation');
module.exports = function getPolyfill() {
if (!String.prototype.trimLeft) {
return implementation;
}
var zeroWidthSpace = '\u200b';
if (zeroWidthSpace.trimLeft() !== zeroWidthSpace) {
return implementation;
}
return String.prototype.trimLeft;
};