mirror of
				https://github.com/taixingyiji/openit.git
				synced 2025-11-04 14:32:14 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			27 lines
		
	
	
		
			693 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			693 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
/** Used for built-in method references. */
 | 
						|
var arrayProto = Array.prototype;
 | 
						|
 | 
						|
/* Built-in method references for those with the same name as other `lodash` methods. */
 | 
						|
var nativeJoin = arrayProto.join;
 | 
						|
 | 
						|
/**
 | 
						|
 * Converts all elements in `array` into a string separated by `separator`.
 | 
						|
 *
 | 
						|
 * @static
 | 
						|
 * @memberOf _
 | 
						|
 * @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);
 | 
						|
}
 | 
						|
 | 
						|
module.exports = join;
 |