@kws3/utils
v0.5.5
Published
Kws3 internel helpers for Svelte App
Readme
Utils
Kws3 internel helper functions for Svelte applications.
Current exported functions
truncate(str, len)- truncates a stringstrto specified lengthlennl2br(str)- converts new lines to<br>tagscloneObject(obj)- deep clones an objectrAF- returns a cross-browser version ofrequestAnimationFramedebounce(func, threshold, immediate)- Debounces a functionfuncso that it can be called only once within thethresholdtime period. Optional third param specifies whetherfuncshould be invoked immediately on first call.
