UNPKG

@arcgis/core

Version:

ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API

6 lines (5 loc) 512 B
/* All material copyright ESRI, All Rights Reserved, unless otherwise specified. See https://js.arcgis.com/4.32/esri/copyright.txt for details. */ function t(t){const n=/{[^{]+?}/g,c=[...t.matchAll(n)];let e=0;const o=[],s=[];for(const l of c){const n=l[0];o.push(t.slice(e,l.index)),s.push(n),e=l.index+n.length}return o.push(t.slice(e)),{literals:o,templates:s}}function n(t,n){return n.reduce(((n,c,e)=>n.concat(t.at(e),c)),"").concat(t.at(-1))}export{n as assembleStringFromParts,t as splitStringIntoParts};