blob: 7e7b965171dc8f3c5c06acd2899598e2c4e80e62 (
plain)
1
2
3
4
5
6
7
8
9
10
|
/**
* Get the last item in t
*/
export const last = <T>(t: T[]): T => t[t.length - 1];
/**
* Generate a random key with a seed
*/
export const getKey = (seed: string) =>
seed + Date.now() + Math.floor(Math.random() * 1000);
|