MCPcopy
hub / github.com/rikschennink/fitty / fitty

Function fitty

src/fitty.js:279–286  ·  view source on GitHub ↗
(target, options = {})

Source from the content-addressed store, hash-verified

277
278 // fitty creation function
279 function fitty(target, options = {}) {
280 // if target is a string
281 return typeof target === 'string'
282 ? // treat it as a querySelector
283 fittyCreate(toArray(document.querySelectorAll(target)), options)
284 : // create single fitty
285 fittyCreate([target], options)[0];
286 }
287
288 // handles viewport changes, redraws all fitties, but only does so after a timeout
289 let resizeDebounce = null;

Callers

nothing calls this directly

Calls 2

fittyCreateFunction · 0.85
toArrayFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…