mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 12:29:55 +08:00
@ -3,7 +3,7 @@ export const isDevMode = () => {
|
||||
};
|
||||
|
||||
export const deprecationWarning = (message: string) => {
|
||||
if(isDevMode()) {
|
||||
if (isDevMode()) {
|
||||
console.warn(message);
|
||||
}
|
||||
};
|
||||
|
3
packages/react-router/src/utils/generateId.ts
Normal file
3
packages/react-router/src/utils/generateId.ts
Normal file
@ -0,0 +1,3 @@
|
||||
let count = 0;
|
||||
|
||||
export const generateId = () => (count++).toString();
|
@ -1,8 +0,0 @@
|
||||
export const generateUniqueId = (length: number = 10) => {
|
||||
const charPool = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
|
||||
const charArray: string[] = [];
|
||||
for(let i = 0; i < length; i++) {
|
||||
charArray.push(charPool[Math.floor(Math.random() * charPool.length)]);
|
||||
}
|
||||
return charArray.join('');
|
||||
};
|
@ -1,2 +1,2 @@
|
||||
export * from './generateUniqueId';
|
||||
export * from './generateId';
|
||||
export * from './dev';
|
||||
|
Reference in New Issue
Block a user