Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. // Based on an old piece of paper my friend Chris wrote on back in our CMSEC days.
  2.  
  3. const first = [
  4. "hydraulic",
  5. "parallel",
  6. "heat-sensitive",
  7. "dielectric",
  8. "auto",
  9. "fiber-optic",
  10. "integrated",
  11. "digital",
  12. "micro"
  13. ]
  14.  
  15. const second = [
  16. "holographic",
  17. "sequence",
  18. "pressurized",
  19. "aerosol",
  20. "bimetal",
  21. "servo",
  22. "wire",
  23. "fluid",
  24. "lubricant"
  25. ]
  26.  
  27. const third = [
  28. "processor",
  29. "sender",
  30. "receiver",
  31. "sensor",
  32. "shaft",
  33. "display",
  34. "wafer",
  35. "feeder",
  36. "linkage",
  37. "separator"
  38. ]
  39.  
  40. const randomInt = (min, max) => Math.floor(Math.random() * (max - min)) + min
  41.  
  42. const randomEntry = (array) => array[randomInt(0, array.length)]
  43.  
  44. const createTechnoThing = () => [first, second, third].map(x => randomEntry(x)).join(' ')
  45.  
  46. const numberOfThings = process.argv[2] || 1
  47. for (let i = 0; i < numberOfThings; i++) {
  48. console.log(`[${i}]: ${createTechnoThing()}`)
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement