You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
717 B

4 years ago
  1. import invoker from "./invoker.js";
  2. /**
  3. * Returns a string made by inserting the `separator` between each element and
  4. * concatenating all the elements into a single string.
  5. *
  6. * @func
  7. * @memberOf R
  8. * @since v0.1.0
  9. * @category List
  10. * @sig String -> [a] -> String
  11. * @param {Number|String} separator The string used to separate the elements.
  12. * @param {Array} xs The elements to join into a string.
  13. * @return {String} str The string made by concatenating `xs` with `separator`.
  14. * @see R.split
  15. * @example
  16. *
  17. * const spacer = R.join(' ');
  18. * spacer(['a', 2, 3.4]); //=> 'a 2 3.4'
  19. * R.join('|', [1, 2, 3]); //=> '1|2|3'
  20. */
  21. var join =
  22. /*#__PURE__*/
  23. invoker(1, 'join');
  24. export default join;