_random_name.js 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726
  1. const adjectives = [
  2. "abandoned",
  3. "aching",
  4. "advanced",
  5. "ample",
  6. "artistic",
  7. "back",
  8. "best",
  9. "bold",
  10. "brief",
  11. "clear",
  12. "cold",
  13. "complicated",
  14. "cooked",
  15. "crazy",
  16. "crushing",
  17. "damp",
  18. "dear",
  19. "definite",
  20. "dependable",
  21. "diligent",
  22. "drab",
  23. "earnest",
  24. "elderly",
  25. "enchanted",
  26. "essential",
  27. "excellent",
  28. "extraneous",
  29. "fixed",
  30. "flowery",
  31. "formal",
  32. "fresh",
  33. "frosty",
  34. "giving",
  35. "glossy",
  36. "healthy",
  37. "helpful",
  38. "impressionable",
  39. "kind",
  40. "large",
  41. "left",
  42. "long",
  43. "loyal",
  44. "mealy",
  45. "memorable",
  46. "monthly",
  47. "new",
  48. "notable",
  49. "only",
  50. "ordinary",
  51. "passionate",
  52. "perfect",
  53. "pertinent",
  54. "proper",
  55. "puzzled",
  56. "reflecting",
  57. "respectful",
  58. "roasted",
  59. "scholarly",
  60. "shiny",
  61. "slight",
  62. "sparkling",
  63. "spotless",
  64. "stupendous",
  65. "sunny",
  66. "tart",
  67. "terrific",
  68. "timely",
  69. "unique",
  70. "upbeat",
  71. "vacant",
  72. "virtual",
  73. "warm",
  74. "weary",
  75. "whispered",
  76. "worthwhile",
  77. "yellow",
  78. ];
  79. const nouns = [
  80. "account",
  81. "acknowledgment",
  82. "address",
  83. "advertising",
  84. "airplane",
  85. "animal",
  86. "appointment",
  87. "arrival",
  88. "artist",
  89. "attachment",
  90. "attitude",
  91. "availability",
  92. "backpack",
  93. "bag",
  94. "balance",
  95. "bass",
  96. "bean",
  97. "beauty",
  98. "bibliography",
  99. "bill",
  100. "bite",
  101. "blossom",
  102. "boat",
  103. "book",
  104. "box",
  105. "boy",
  106. "bread",
  107. "bridge",
  108. "broccoli",
  109. "building",
  110. "butter",
  111. "button",
  112. "cabbage",
  113. "cake",
  114. "camera",
  115. "camp",
  116. "candle",
  117. "candy",
  118. "canvas",
  119. "car",
  120. "card",
  121. "carrot",
  122. "cart",
  123. "case",
  124. "cat",
  125. "chain",
  126. "chair",
  127. "chalk",
  128. "chance",
  129. "change",
  130. "channel",
  131. "character",
  132. "charge",
  133. "charm",
  134. "chart",
  135. "check",
  136. "cheek",
  137. "cheese",
  138. "chef",
  139. "cherry",
  140. "chicken",
  141. "child",
  142. "church",
  143. "circle",
  144. "class",
  145. "clay",
  146. "click",
  147. "clock",
  148. "cloth",
  149. "cloud",
  150. "clove",
  151. "club",
  152. "coach",
  153. "coal",
  154. "coast",
  155. "coat",
  156. "cod",
  157. "coffee",
  158. "collar",
  159. "color",
  160. "comb",
  161. "comfort",
  162. "comic",
  163. "committee",
  164. "community",
  165. "company",
  166. "comparison",
  167. "competition",
  168. "condition",
  169. "connection",
  170. "control",
  171. "cook",
  172. "copper",
  173. "copy",
  174. "corn",
  175. "cough",
  176. "country",
  177. "cover",
  178. "crate",
  179. "crayon",
  180. "cream",
  181. "creator",
  182. "crew",
  183. "crown",
  184. "current",
  185. "curtain",
  186. "curve",
  187. "cushion",
  188. "dad",
  189. "daughter",
  190. "day",
  191. "death",
  192. "debt",
  193. "decision",
  194. "deer",
  195. "degree",
  196. "design",
  197. "desire",
  198. "desk",
  199. "detail",
  200. "development",
  201. "digestion",
  202. "dime",
  203. "dinner",
  204. "direction",
  205. "dirt",
  206. "discovery",
  207. "discussion",
  208. "disease",
  209. "disgust",
  210. "distance",
  211. "distribution",
  212. "division",
  213. "doctor",
  214. "dog",
  215. "door",
  216. "drain",
  217. "drawer",
  218. "dress",
  219. "drink",
  220. "driving",
  221. "dust",
  222. "ear",
  223. "earth",
  224. "edge",
  225. "education",
  226. "effect",
  227. "egg",
  228. "end",
  229. "energy",
  230. "engine",
  231. "error",
  232. "event",
  233. "example",
  234. "exchange",
  235. "existence",
  236. "expansion",
  237. "experience",
  238. "expert",
  239. "eye",
  240. "face",
  241. "fact",
  242. "fall",
  243. "family",
  244. "farm",
  245. "father",
  246. "fear",
  247. "feeling",
  248. "field",
  249. "finger",
  250. "fire",
  251. "fish",
  252. "flag",
  253. "flight",
  254. "floor",
  255. "flower",
  256. "fold",
  257. "food",
  258. "football",
  259. "force",
  260. "form",
  261. "frame",
  262. "friend",
  263. "frog",
  264. "fruit",
  265. "fuel",
  266. "furniture",
  267. "game",
  268. "garden",
  269. "gate",
  270. "girl",
  271. "glass",
  272. "glove",
  273. "goat",
  274. "gold",
  275. "government",
  276. "grade",
  277. "grain",
  278. "grass",
  279. "green",
  280. "grip",
  281. "group",
  282. "growth",
  283. "guide",
  284. "guitar",
  285. "hair",
  286. "hall",
  287. "hand",
  288. "harbor",
  289. "harmony",
  290. "hat",
  291. "head",
  292. "health",
  293. "heart",
  294. "heat",
  295. "hill",
  296. "history",
  297. "hobbies",
  298. "hole",
  299. "hope",
  300. "horn",
  301. "horse",
  302. "hospital",
  303. "hour",
  304. "house",
  305. "humor",
  306. "idea",
  307. "impulse",
  308. "income",
  309. "increase",
  310. "industry",
  311. "ink",
  312. "insect",
  313. "instrument",
  314. "insurance",
  315. "interest",
  316. "invention",
  317. "iron",
  318. "island",
  319. "jelly",
  320. "jet",
  321. "jewel",
  322. "join",
  323. "judge",
  324. "juice",
  325. "jump",
  326. "kettle",
  327. "key",
  328. "kick",
  329. "kiss",
  330. "kitten",
  331. "knee",
  332. "knife",
  333. "knowledge",
  334. "land",
  335. "language",
  336. "laugh",
  337. "law",
  338. "lead",
  339. "learning",
  340. "leather",
  341. "leg",
  342. "lettuce",
  343. "level",
  344. "library",
  345. "lift",
  346. "light",
  347. "limit",
  348. "line",
  349. "linen",
  350. "lip",
  351. "liquid",
  352. "list",
  353. "look",
  354. "loss",
  355. "love",
  356. "lunch",
  357. "machine",
  358. "man",
  359. "manager",
  360. "map",
  361. "marble",
  362. "mark",
  363. "market",
  364. "mass",
  365. "match",
  366. "meal",
  367. "measure",
  368. "meat",
  369. "meeting",
  370. "memory",
  371. "metal",
  372. "middle",
  373. "milk",
  374. "mind",
  375. "mine",
  376. "minute",
  377. "mist",
  378. "mitten",
  379. "mom",
  380. "money",
  381. "monkey",
  382. "month",
  383. "moon",
  384. "morning",
  385. "mother",
  386. "motion",
  387. "mountain",
  388. "mouth",
  389. "muscle",
  390. "music",
  391. "nail",
  392. "name",
  393. "nation",
  394. "neck",
  395. "need",
  396. "news",
  397. "night",
  398. "noise",
  399. "note",
  400. "number",
  401. "nut",
  402. "observation",
  403. "offer",
  404. "oil",
  405. "operation",
  406. "opinion",
  407. "orange",
  408. "order",
  409. "organization",
  410. "ornament",
  411. "oven",
  412. "page",
  413. "pail",
  414. "pain",
  415. "paint",
  416. "pan",
  417. "pancake",
  418. "paper",
  419. "parcel",
  420. "parent",
  421. "part",
  422. "passenger",
  423. "paste",
  424. "payment",
  425. "peace",
  426. "pear",
  427. "pen",
  428. "pencil",
  429. "person",
  430. "pest",
  431. "pet",
  432. "picture",
  433. "pie",
  434. "pin",
  435. "pipe",
  436. "pizza",
  437. "place",
  438. "plane",
  439. "plant",
  440. "plastic",
  441. "plate",
  442. "play",
  443. "pleasure",
  444. "plot",
  445. "plough",
  446. "pocket",
  447. "point",
  448. "poison",
  449. "police",
  450. "pollution",
  451. "popcorn",
  452. "porter",
  453. "position",
  454. "pot",
  455. "potato",
  456. "powder",
  457. "power",
  458. "price",
  459. "print",
  460. "process",
  461. "produce",
  462. "product",
  463. "profit",
  464. "property",
  465. "prose",
  466. "protest",
  467. "pull",
  468. "pump",
  469. "punishment",
  470. "purpose",
  471. "push",
  472. "quarter",
  473. "question",
  474. "quiet",
  475. "quill",
  476. "quilt",
  477. "quince",
  478. "rabbit",
  479. "rail",
  480. "rain",
  481. "range",
  482. "rat",
  483. "rate",
  484. "ray",
  485. "reaction",
  486. "reading",
  487. "reason",
  488. "record",
  489. "regret",
  490. "relation",
  491. "religion",
  492. "representative",
  493. "request",
  494. "respect",
  495. "rest",
  496. "reward",
  497. "rhythm",
  498. "rice",
  499. "river",
  500. "road",
  501. "roll",
  502. "room",
  503. "root",
  504. "rose",
  505. "route",
  506. "rub",
  507. "rule",
  508. "run",
  509. "sack",
  510. "sail",
  511. "salt",
  512. "sand",
  513. "scale",
  514. "scarecrow",
  515. "scarf",
  516. "scene",
  517. "scent",
  518. "school",
  519. "science",
  520. "scissors",
  521. "screw",
  522. "sea",
  523. "seat",
  524. "secretary",
  525. "seed",
  526. "selection",
  527. "self",
  528. "sense",
  529. "servant",
  530. "shade",
  531. "shake",
  532. "shame",
  533. "shape",
  534. "sheep",
  535. "sheet",
  536. "shelf",
  537. "ship",
  538. "shirt",
  539. "shock",
  540. "shoe",
  541. "shop",
  542. "show",
  543. "side",
  544. "sign",
  545. "silk",
  546. "sink",
  547. "sister",
  548. "size",
  549. "sky",
  550. "sleep",
  551. "smash",
  552. "smell",
  553. "smile",
  554. "smoke",
  555. "snail",
  556. "snake",
  557. "sneeze",
  558. "snow",
  559. "soap",
  560. "society",
  561. "sock",
  562. "soda",
  563. "sofa",
  564. "son",
  565. "song",
  566. "sort",
  567. "sound",
  568. "soup",
  569. "space",
  570. "spark",
  571. "speed",
  572. "sponge",
  573. "spoon",
  574. "spray",
  575. "spring",
  576. "spy",
  577. "square",
  578. "stamp",
  579. "star",
  580. "start",
  581. "statement",
  582. "station",
  583. "steam",
  584. "steel",
  585. "stem",
  586. "step",
  587. "stew",
  588. "stick",
  589. "stitch",
  590. "stocking",
  591. "stomach",
  592. "stone",
  593. "stop",
  594. "store",
  595. "story",
  596. "stove",
  597. "stranger",
  598. "straw",
  599. "stream",
  600. "street",
  601. "stretch",
  602. "string",
  603. "structure",
  604. "substance",
  605. "sugar",
  606. "suggestion",
  607. "suit",
  608. "summer",
  609. "sun",
  610. "support",
  611. "surprise",
  612. "sweater",
  613. "swim",
  614. "system",
  615. "table",
  616. "tail",
  617. "talk",
  618. "tank",
  619. "taste",
  620. "tax",
  621. "tea",
  622. "teaching",
  623. "team",
  624. "tendency",
  625. "test",
  626. "texture",
  627. "theory",
  628. "thing",
  629. "thought",
  630. "thread",
  631. "throat",
  632. "thumb",
  633. "thunder",
  634. "ticket",
  635. "time",
  636. "tin",
  637. "title",
  638. "toad",
  639. "toe",
  640. "tooth",
  641. "toothpaste",
  642. "touch",
  643. "town",
  644. "toy",
  645. "trade",
  646. "train",
  647. "transport",
  648. "tray",
  649. "treatment",
  650. "tree",
  651. "trick",
  652. "trip",
  653. "trouble",
  654. "trousers",
  655. "truck",
  656. "tub",
  657. "turkey",
  658. "turn",
  659. "twist",
  660. "umbrella",
  661. "uncle",
  662. "underwear",
  663. "unit",
  664. "use",
  665. "vacation",
  666. "value",
  667. "van",
  668. "vase",
  669. "vegetable",
  670. "veil",
  671. "vein",
  672. "verse",
  673. "vessel",
  674. "view",
  675. "visitor",
  676. "voice",
  677. "volcano",
  678. "walk",
  679. "wall",
  680. "war",
  681. "wash",
  682. "waste",
  683. "watch",
  684. "water",
  685. "wave",
  686. "wax",
  687. "way",
  688. "wealth",
  689. "weather",
  690. "week",
  691. "weight",
  692. "wheel",
  693. "whip",
  694. "whistle",
  695. "window",
  696. "wine",
  697. "wing",
  698. "winter",
  699. "wire",
  700. "wish",
  701. "woman",
  702. "wood",
  703. "wool",
  704. "word",
  705. "work",
  706. "worm",
  707. "wound",
  708. "wrist",
  709. "writer",
  710. "yard",
  711. "yoke",
  712. "zebra",
  713. "zinc",
  714. "zipper",
  715. "zone",
  716. ];
  717. /**
  718. * Generate a random name.
  719. * @returns {string} A random name.
  720. */
  721. export function randomName() {
  722. const adjective = adjectives[Math.floor(Math.random() * adjectives.length)];
  723. const noun = nouns[Math.floor(Math.random() * nouns.length)];
  724. const number = Math.floor(Math.random() * 100);
  725. return `${adjective}-${noun}-${number}`;
  726. }