pad.js 541 B

123456789101112131415161718192021222324
  1. "use strict";
  2. var partial = require("../../../function/#/partial");
  3. module.exports = {
  4. Left: function (t, a) {
  5. t = partial.call(t, "x", 5);
  6. a(t.call("yy"), "xxxyy");
  7. a(t.call(""), "xxxxx", "Empty string");
  8. a(t.call("yyyyy"), "yyyyy", "Equal length");
  9. a(t.call("yyyyyyy"), "yyyyyyy", "Longer");
  10. },
  11. Right: function (t, a) {
  12. t = partial.call(t, "x", -5);
  13. a(t.call("yy"), "yyxxx");
  14. a(t.call(""), "xxxxx", "Empty string");
  15. a(t.call("yyyyy"), "yyyyy", "Equal length");
  16. a(t.call("yyyyyyy"), "yyyyyyy", "Longer");
  17. }
  18. };