es7.string.pad-end.js 541 B

1234567891011121314
  1. 'use strict';
  2. // https://github.com/tc39/proposal-string-pad-start-end
  3. var $export = require('./_export');
  4. var $pad = require('./_string-pad');
  5. var userAgent = require('./_user-agent');
  6. // https://github.com/zloirock/core-js/issues/280
  7. var WEBKIT_BUG = /Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent);
  8. $export($export.P + $export.F * WEBKIT_BUG, 'String', {
  9. padEnd: function padEnd(maxLength /* , fillString = ' ' */) {
  10. return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false);
  11. }
  12. });