ArrayBuffer.isView()

ArrayBuffer.isView() 메서드는 주어진 값이 ArrayBuffer 뷰, 즉 형식화 배열 객체 또는 DataView인지 판별합니다..

구문

ArrayBuffer.isView(value)

매개변수

value
판별할 값.

반환 값

주어진 값이 ArrayBuffer 뷰라면 true, 아니면 false.

예제

ArrayBuffer.isView();                    // false              
ArrayBuffer.isView([]);                  // false
ArrayBuffer.isView({});                  // false
ArrayBuffer.isView(null);                // false
ArrayBuffer.isView(undefined);           // false
ArrayBuffer.isView(new ArrayBuffer(10)); // false
 
ArrayBuffer.isView(new Uint8Array());    // true
ArrayBuffer.isView(new Float32Array());  // true
ArrayBuffer.isView(new Int8Array(10).subarray(0, 3)); // true

const buffer = new ArrayBuffer(2);
const dv = new DataView(buffer);
ArrayBuffer.isView(dv); // true

명세

Specification
ECMAScript (ECMA-262)
The definition of 'ArrayBuffer.isView' in that specification.

브라우저 호환성

Update compatibility data on GitHub
DesktopMobileServer
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung InternetNode.js
isViewChrome Full support 32Edge Full support 12Firefox Full support 29IE Full support 11Opera Full support 19Safari Full support 7WebView Android Full support ≤37Chrome Android Full support 32Firefox Android Full support 29Opera Android Full support 19Safari iOS Full support 7Samsung Internet Android Full support 2.0nodejs Full support 4.0.0

Legend

Full support  
Full support

같이 보기