debounce
usage
ts
import { debounce } from 'comuse-shared'
const fn = debounce(() => {
console.log('debounced')
}, 1000)
fn()
throttle
usage
ts
import { throttle } from 'comuse-shared'
const fn = throttle(() => {
console.log('throttled')
}, 1000)
fn()
splitKeyValues
usage
ts
import { splitKeyValues } from 'comuse-shared'
const data = splitKeyValues('id1,id2', 'name1,name2')
console.log(data) // [{ id: 'id1', name: 'name1' }, { id: 'id2', name: 'name2' }]
uuid
usage
ts
import { uuid } from 'comuse-shared'
console.log(uuid()) // '4222fcfe-5721-4632-bede-6043885be57d'
openFile
usage
ts
import { openFile } from 'comuse-shared'
openFile('https://example.com/file.txt')
toThousand
usage
ts
import { toThousand } from 'comuse-shared'
console.log(toThousand(1234567.89)) // '1,234,567'
Source
Changelog
Pending for release...
4b345
- feat: add toThousand function6d2a5
- feat: add toThousand function8f181
- feat: add toThousand functionb7411
- feat: add openFile functionv3.2.13
on 6/26/2025527e8
- feat: add uuid methodv3.2.12
on 6/17/2025bfe03
- feat: add uuid methodv3.2.9
on 5/19/202517cd8
- feat: add randomStrinf functionv3.2.8
on 4/22/20252ba19
- feat: remove typing-ts55713
- feat: add utils function splitKeyValuesv3.2.7
on 3/25/2025a32db
- feat: add nowStr functionv3.2.3
on 1/23/2025d2209
- feat: core function support refValuev3.2.2
on 1/23/2025301cc
- feat: core function support refValuev3.1.0
on 1/9/202549422
- feat: add useThrottle and useDebounce function59615
- feat: add throttle function049f7
- feat: animation mdv3.0.0
on 1/7/2025825ca
- feat: shared add functions animation, ease, gesturee3dd2
- feat: add until functions