blob: 1235792743a2081e70ff056097d4e3315cdb3137 (
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)
|