@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
6 lines (5 loc) • 610 B
JavaScript
/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
*/
import{nativeArrayMaxSize as r,isUint16Array as t}from"../../../../core/typedArrayUtil.js";function a(a){if(a.length<r)return Array.from(a);if(Array.isArray(a))return Float64Array.from(a);if(!("BYTES_PER_ELEMENT"in a))return Array.from(a);switch(a.BYTES_PER_ELEMENT){case 1:return Uint8Array.from(a);case 2:return t(a)?Uint16Array.from(a):Int16Array.from(a);case 4:return Float32Array.from(a);default:return Float64Array.from(a)}}export{a as cloneAttributeData};