get-primitive-fixed.js 281 B

12345678910111213141516
  1. "use strict";
  2. module.exports = function (length) {
  3. if (!length) {
  4. return function () {
  5. return "";
  6. };
  7. }
  8. return function (args) {
  9. var id = String(args[0]), i = 0, currentLength = length;
  10. while (--currentLength) {
  11. id += "\u0001" + args[++i];
  12. }
  13. return id;
  14. };
  15. };