MCPcopy
hub / github.com/greensock/GSAP / _toArray

Function _toArray

esm/SplitText.js:9–12  ·  view source on GitHub ↗
(r)

Source from the content-addressed store, hash-verified

7 */
8
9let gsap, _fonts, _splitProp = typeof Symbol === "function" ? Symbol() : "_split", _coreInitted, _initIfNecessary = () => _coreInitted || SplitText.register(window.gsap), _charSegmenter = typeof Intl !== "undefined" && "Segmenter" in Intl ? new Intl.Segmenter() : 0, _toArray = (r) => !r ? [] : typeof r === "string" ? _toArray(document.querySelectorAll(r)) : "length" in r ? Array.from(r).reduce((acc, cur) => {
10 typeof cur === "string" ? acc.push(..._toArray(cur)) : acc.push(cur);
11 return acc;
12}, []) : [r], _elements = (targets) => _toArray(targets).filter((e) => e && e.nodeType === 1), _emptyArray = [], _context = function() {
13}, _defaultContext = { add: (f) => f() }, _spacesRegEx = /\s+/g, _emojiSafeRegEx = new RegExp("\\p{RI}\\p{RI}|\\p{Emoji}(\\p{EMod}|\\u{FE0F}\\u{20E3}?|[\\u{E0020}-\\u{E007E}]+\\u{E007F})?(\\u{200D}\\p{Emoji}(\\p{EMod}|\\u{FE0F}\\u{20E3}?|[\\u{E0020}-\\u{E007E}]+\\u{E007F})?)*|.", "gu"), _emptyBounds = { left: 0, top: 0, width: 0, height: 0 }, _findNextValidBounds = (allBounds, startIndex) => {
14 while (++startIndex < allBounds.length && allBounds[startIndex] === _emptyBounds) {
15 }

Callers 15

_hideAllMarkersFunction · 0.70
ScrollTrigger.jsFile · 0.70
_alignFunction · 0.70
ScrollSmootherFunction · 0.70
ScrollSmoother.jsFile · 0.70
_elementsFunction · 0.70
splitMethod · 0.70
_parseRectFunction · 0.70
_getBoundsFunction · 0.70
_getElementBoundsFunction · 0.70
DraggableFunction · 0.70

Calls 1

fromMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…