slug.ts 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. export namespace Slug {
  2. const ADJECTIVES = [
  3. "brave",
  4. "calm",
  5. "clever",
  6. "cosmic",
  7. "crisp",
  8. "curious",
  9. "eager",
  10. "gentle",
  11. "glowing",
  12. "happy",
  13. "hidden",
  14. "jolly",
  15. "kind",
  16. "lucky",
  17. "mighty",
  18. "misty",
  19. "neon",
  20. "nimble",
  21. "playful",
  22. "proud",
  23. "quick",
  24. "quiet",
  25. "shiny",
  26. "silent",
  27. "stellar",
  28. "sunny",
  29. "swift",
  30. "tidy",
  31. "witty",
  32. ] as const
  33. const NOUNS = [
  34. "cabin",
  35. "cactus",
  36. "canyon",
  37. "circuit",
  38. "comet",
  39. "eagle",
  40. "engine",
  41. "falcon",
  42. "forest",
  43. "garden",
  44. "harbor",
  45. "island",
  46. "knight",
  47. "lagoon",
  48. "meadow",
  49. "moon",
  50. "mountain",
  51. "nebula",
  52. "orchid",
  53. "otter",
  54. "panda",
  55. "pixel",
  56. "planet",
  57. "river",
  58. "rocket",
  59. "sailor",
  60. "squid",
  61. "star",
  62. "tiger",
  63. "wizard",
  64. "wolf",
  65. ] as const
  66. export function create() {
  67. return [
  68. ADJECTIVES[Math.floor(Math.random() * ADJECTIVES.length)],
  69. NOUNS[Math.floor(Math.random() * NOUNS.length)],
  70. ].join("-")
  71. }
  72. }