Skip to content

debounce

Category
Last Changed
1月9日8时48分

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

SourceDocs

Changelog

Pending for release...
4b345 - feat: add toThousand function
6d2a5 - feat: add toThousand function
8f181 - feat: add toThousand function
b7411 - feat: add openFile function
v3.2.13 on 6/26/2025
527e8 - feat: add uuid method
v3.2.12 on 6/17/2025
bfe03 - feat: add uuid method
v3.2.9 on 5/19/2025
17cd8 - feat: add randomStrinf function
v3.2.8 on 4/22/2025
2ba19 - feat: remove typing-ts
55713 - feat: add utils function splitKeyValues
v3.2.7 on 3/25/2025
a32db - feat: add nowStr function
v3.2.3 on 1/23/2025
d2209 - feat: core function support refValue
v3.2.2 on 1/23/2025
301cc - feat: core function support refValue
v3.1.0 on 1/9/2025
49422 - feat: add useThrottle and useDebounce function
59615 - feat: add throttle function
049f7 - feat: animation md
v3.0.0 on 1/7/2025
825ca - feat: shared add functions animation, ease, gesture
e3dd2 - feat: add until functions

Released under the MIT License.