index.js 687 B

12345678910111213141516171819202122232425262728
  1. 'use strict';
  2. var define = require('define-properties');
  3. var RequireObjectCoercible = require('es-abstract/2019/RequireObjectCoercible');
  4. var callBind = require('es-abstract/helpers/callBind');
  5. var implementation = require('./implementation');
  6. var getPolyfill = require('./polyfill');
  7. var shim = require('./shim');
  8. var bound = callBind.apply(getPolyfill());
  9. var boundPadEnd = function padEnd(str, maxLength) {
  10. RequireObjectCoercible(str);
  11. var args = [maxLength];
  12. if (arguments.length > 2) {
  13. args.push(arguments[2]);
  14. }
  15. return bound(str, args);
  16. };
  17. define(boundPadEnd, {
  18. getPolyfill: getPolyfill,
  19. implementation: implementation,
  20. shim: shim
  21. });
  22. module.exports = boundPadEnd;