zioinfo-mail/app/node_modules/join-component/index.js
DESKTOP-TKLFCPR\ython 11c670f2a0 refactor: 101.79.17.164 → zioinfo.co.kr 전체 도메인 변환 + Manager UI 배포
- 37개 파일 IP → zioinfo.co.kr 치환 (소스/매뉴얼/설정/하네스)
- Manager DrConsole/NetworkConsole/CsapConsole 빌드 + /var/www/manager/ 배포
- 테스트: Manager HTTP 200, ITSM 신규 API 7개 전체 200

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 10:09:17 +09:00

29 lines
559 B
JavaScript

/**
* Join `arr` with the trailing `str` defaulting to "and",
* and `sep` string defaulting to ", ".
*
* @param {Array} arr
* @param {String} str
* @param {String} sep
* @return {String}
* @api public
*/
module.exports = function(arr, str, sep){
str = str || 'and';
sep = sep || ', ';
if (arr.length < 2) return arr[0] || '';
var oxford = str.slice(0, 2) === sep;
if (!oxford) {
str = ' ' + str;
} else if (arr.length == 2) {
str = str.slice(1);
}
return arr.slice(0, -1).join(sep) + str + ' ' + arr[arr.length - 1];
};