15 lines
333 B
JavaScript
15 lines
333 B
JavaScript
'use strict';
|
|
|
|
var define = require('define-properties');
|
|
var getPolyfill = require('./polyfill');
|
|
|
|
module.exports = function shimTrimLeft() {
|
|
var polyfill = getPolyfill();
|
|
define(
|
|
String.prototype,
|
|
{ trimLeft: polyfill },
|
|
{ trimLeft: function () { return String.prototype.trimLeft !== polyfill; } }
|
|
);
|
|
return polyfill;
|
|
};
|