mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 02:47:50 +00:00
Remove join.
This commit is contained in:
21
join.js
21
join.js
@@ -1,21 +0,0 @@
|
|||||||
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
||||||
const nativeJoin = Array.prototype.join
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts all elements in `array` into a string separated by `separator`.
|
|
||||||
*
|
|
||||||
* @since 4.0.0
|
|
||||||
* @category Array
|
|
||||||
* @param {Array} array The array to convert.
|
|
||||||
* @param {string} [separator=','] The element separator.
|
|
||||||
* @returns {string} Returns the joined string.
|
|
||||||
* @example
|
|
||||||
*
|
|
||||||
* join(['a', 'b', 'c'], '~')
|
|
||||||
* // => 'a~b~c'
|
|
||||||
*/
|
|
||||||
function join(array, separator) {
|
|
||||||
return array == null ? '' : nativeJoin.call(array, separator)
|
|
||||||
}
|
|
||||||
|
|
||||||
export default join
|
|
||||||
Reference in New Issue
Block a user