Repository navigation
Releases
Releases · cp949/utilx
v3.0.0
추가
isArraySorted: 배열이 오름차순이면true다. 같은 값이 이어지는 것은 허용한다.comparator를 생략하면>로 비교하며NaN,null,undefined가 있으면false다.comparator를 넘기면sort의 비교 함수 규칙으로 인접한 항목만 비교한다.
isValidIndex:index가 정수이고0 <= index < 길이이면true다.hasTouchSupport,hasWebBluetooth,hasWebSerial: 브라우저 기능 감지다.window나navigator가 없는 서버에서는false다.hasTouchSupport는window에ontouchstart가 있거나navigator.maxTouchPoints가0보다 크면true다. 터치가 주 입력인지는 알려 주지 않는다.hasWebBluetooth,hasWebSerial은navigator에bluetooth,serial이 있으면true다. 권한 승인이나 장치 유무는 확인하지 않는다.
Breaking Changes
isValidIndexRange를 제거했다. 단일 인덱스 검사는isValidIndex를 쓴다.