This repository has been archived on 2020-11-02. You can view files and clone it, but cannot push or open issues or pull requests.
TripSit_Suite/node_modules/string.prototype.trimstart/polyfill.js

16 lines
463 B
JavaScript

'use strict';
var implementation = require('./implementation');
module.exports = function getPolyfill() {
if (!String.prototype.trimStart && !String.prototype.trimLeft) {
return implementation;
}
var zeroWidthSpace = '\u200b';
var trimmed = zeroWidthSpace.trimStart ? zeroWidthSpace.trimStart() : zeroWidthSpace.trimLeft();
if (trimmed !== zeroWidthSpace) {
return implementation;
}
return String.prototype.trimStart || String.prototype.trimLeft;
};