File size: 194 Bytes
8a49743
9a79ad0
8a49743
 
 
 
1
2
3
4
5
6
7
import { nanoid } from 'nanoid';
import { kebabCase } from './kebabCase';

export function generateId(name: string): string {
	return kebabCase(name.replace(/&/g, '-and-')) + '-' + nanoid(6);
}