mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-12 03:47:50 +00:00
Bump to v4.0.0.
This commit is contained in:
34
lodash.join/index.js
Normal file
34
lodash.join/index.js
Normal file
@@ -0,0 +1,34 @@
|
||||
/**
|
||||
* lodash 4.0.0 (Custom Build) <https://lodash.com/>
|
||||
* Build: `lodash modularize exports="npm" -o ./`
|
||||
* Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
|
||||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||
* Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
* Available under MIT license <https://lodash.com/license>
|
||||
*/
|
||||
|
||||
/** Used for built-in method references. */
|
||||
var arrayProto = global.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 _
|
||||
* @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 ? nativeJoin.call(array, separator) : '';
|
||||
}
|
||||
|
||||
module.exports = join;
|
||||
Reference in New Issue
Block a user