(target, options = {})
| 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; |
nothing calls this directly
no test coverage detected
searching dependent graphs…