Files
react-navigation/packages/core/src/routers/KeyGenerator.ts
Evan Bacon 7769428269 Update Webpack / Babel config
* Added module path in package.json
* Marked as having no side-effects
* Disable commonjs on build
2019-03-09 01:17:47 -08:00

12 lines
258 B
TypeScript

let uniqueBaseId: string = `id-${Date.now()}`;
let uuidCount: number = 0;
export function _TESTING_ONLY_normalize_keys(): void {
uniqueBaseId = `id`;
uuidCount = 0;
}
export function generateKey(): string {
return `${uniqueBaseId}-${uuidCount++}`;
}