Skip to main content
Module

x/ramda/join.js

:ram: Practical functional Javascript
Very Popular
Go to Latest
File
import invoker from './invoker';

/** * Returns a string made by inserting the `separator` between each element and * concatenating all the elements into a single string. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig String -> [a] -> String * @param {Number|String} separator The string used to separate the elements. * @param {Array} xs The elements to join into a string. * @return {String} str The string made by concatenating `xs` with `separator`. * @see R.split * @example * * const spacer = R.join(' '); * spacer(['a', 2, 3.4]); //=> 'a 2 3.4' * R.join('|', [1, 2, 3]); //=> '1|2|3' */var join = invoker(1, 'join');export default join;