mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-16 10:01:59 +08:00
refactor(utils): remove duplicated functions in react utils (#18817)
This commit is contained in:

committed by
Brandy Carney

parent
b7761fe353
commit
2e02dc7319
@ -1,12 +1,4 @@
|
|||||||
export const dashToPascalCase = (str: string) => str.toLowerCase().split('-').map(segment => segment.charAt(0).toUpperCase() + segment.slice(1)).join('');
|
export * from './utils';
|
||||||
|
|
||||||
export function generateUniqueId() {
|
|
||||||
return ([1e7].toString() + -1e3.toString() + -4e3.toString() + -8e3.toString() + -1e11.toString()).replace(/[018]/g, function(c: any) {
|
|
||||||
const random = crypto.getRandomValues(new Uint8Array(1)) as Uint8Array;
|
|
||||||
return (c ^ random[0] & 15 >> c / 4).toString(16);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
export * from './attachEventProps';
|
export * from './attachEventProps';
|
||||||
export * from './IonicContext';
|
export * from './IonicContext';
|
||||||
export * from './utilHooks';
|
export * from './utilHooks';
|
||||||
|
Reference in New Issue
Block a user