mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-15 17:42:15 +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 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 './utils';
|
||||
export * from './attachEventProps';
|
||||
export * from './IonicContext';
|
||||
export * from './utilHooks';
|
||||
|
Reference in New Issue
Block a user