root / HServer / 00.Server / 00.Program / node_modules / lodash / join.js
이력 | 보기 | 이력해설 | 다운로드 (693 Bytes)
| 1 | 39 | HKM | /** Used for built-in method references. */
|
|---|---|---|---|
| 2 | var arrayProto = Array.prototype;
|
||
| 3 | |||
| 4 | /* Built-in method references for those with the same name as other `lodash` methods. */
|
||
| 5 | var nativeJoin = arrayProto.join;
|
||
| 6 | |||
| 7 | /**
|
||
| 8 | * Converts all elements in `array` into a string separated by `separator`.
|
||
| 9 | *
|
||
| 10 | * @static
|
||
| 11 | * @memberOf _
|
||
| 12 | * @since 4.0.0
|
||
| 13 | * @category Array
|
||
| 14 | * @param {Array} array The array to convert.
|
||
| 15 | * @param {string} [separator=','] The element separator.
|
||
| 16 | * @returns {string} Returns the joined string.
|
||
| 17 | * @example
|
||
| 18 | *
|
||
| 19 | * _.join(['a', 'b', 'c'], '~');
|
||
| 20 | * // => 'a~b~c'
|
||
| 21 | */
|
||
| 22 | function join(array, separator) { |
||
| 23 | return array == null ? '' : nativeJoin.call(array, separator); |
||
| 24 | } |
||
| 25 | |||
| 26 | module.exports = join; |