diff --git a/src/index.ts b/src/index.ts index 614a0d9..88d11d2 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,2 +1,5 @@ -export * from './react-vtree' +export * from './react-spring' +export * from './react-use-gesture' + export * from './react-window' +export * from './react-vtree' diff --git a/src/utils.ts b/src/utils.ts index 6881f9d..b284d93 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -28,3 +28,12 @@ export function uuid(len = 8, radix = 16): string { return value.join('') } + +/** + * 替换 camelCase 为 dashedCase. + * + * @see https://github.com/NervJS/taro/blob/next/packages/shared/src/utils.ts + */ +export function toDashed(s: string) { + return s.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase() +}