diff options
Diffstat (limited to 'tools/eslint/node_modules/lodash/join.js')
-rw-r--r-- | tools/eslint/node_modules/lodash/join.js | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tools/eslint/node_modules/lodash/join.js b/tools/eslint/node_modules/lodash/join.js new file mode 100644 index 0000000000..79d308d281 --- /dev/null +++ b/tools/eslint/node_modules/lodash/join.js @@ -0,0 +1,25 @@ +/** 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 _ + * @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; |