UNPKG

@xaroth8088/random-names

Version:

A random name generator for all kinds of things

23 lines (21 loc) 6.85 kB
import { sample } from 'lodash-es'; export default function sciFiGuns() { let names; const nm1 = ['Active', 'Adjustable', 'Agony', 'Allegiance', 'Alpha', 'Amnesia', 'Anti-Tank', 'Apocalypse', 'Apocalyptic', 'Armageddon', 'Ash', 'Astral', 'Atomic', 'Attuned', 'Augmented', 'Bandit\'s', 'Battlestar', 'Battleworn', 'Blackout', 'Brutal', 'Carbon', 'Cataclysm', 'Cataclysmic', 'Challenger', 'Challenger\'s', 'Champion', 'Champion\'s', 'Chaos', 'Chromed', 'Close-Defence', 'Comet', 'Commando', 'Commando\'s', 'Conqueror', 'Conqueror\'s', 'Cosmic', 'Cosmos', 'Crimson', 'Cruiser', 'Cyclone', 'Dancing', 'Dark', 'Decimation', 'Defender', 'Defender\'s', 'Desolation', 'Diabolical', 'Dire', 'Discharge', 'Divine', 'Doom', 'Doom\'s', 'Ebon', 'Echo', 'Eclipse', 'Energized', 'Engraved', 'Enhanced', 'Eternal', 'Explosive', 'Falcon', 'Fancy', 'Ferocious', 'Fireguard', 'Firestorm', 'Frenzied', 'Frenzy', 'Furious', 'Fury', 'Fusion', 'Gilded', 'Gladiator', 'Grieving', 'Guard\'s', 'Guardian\'s', 'Guerilla', 'Heavy', 'Hero', 'Hero\'s', 'High-Frequency', 'High-Power', 'High-Speed', 'Honed', 'Honor\'s', 'Howling', 'Hungering', 'Infantry', 'Infantry\'s', 'Infused', 'Ivory', 'Judgement', 'Keeper\'s', 'Legionnaire', 'Legionnaire\'s', 'Light', 'Lightning', 'Limbo', 'Long-Range', 'Low-Frequency', 'Low-Power', 'Magma', 'Malevolent', 'Malice', 'Malicious', 'Maleficent', 'Malignant', 'Massive', 'Mercenary', 'Mercy', 'Meteor', 'Midnight', 'Military', 'Moonlight', 'Mourning', 'Multi-Load', 'Multi-Shot', 'Nightfall', 'Nightmare', 'Nightwatch', 'Nuclear', 'Oathkeeper\'s', 'Oblivion', 'Obsidian', 'Omega', 'Peacekeeper', 'Peacekeeper\'s', 'Pendulum', 'Phantom', 'Polarized', 'Powered', 'Prime', 'Primitive', 'Protector\'s', 'Proud', 'Pure', 'Raging', 'Rapid-Fire', 'Rapture', 'Recruit\'s', 'Refined', 'Reforged', 'Renewed', 'Renovated', 'Replica', 'Requiem', 'Retribution', 'Ritual', 'Roaring', 'Savage', 'Self-Guided', 'Sentinel', 'Shadow', 'Short-Range', 'Silent', 'Silver', 'Singing', 'Single-Load', 'Single-Shot', 'Smooth', 'Soldier\'s', 'Spectral', 'Standard', 'Storm', 'Stormbringer', 'Stormfury', 'Stormguard', 'Stormrider', 'Sunshine', 'Supernova', 'Thunder', 'Thunderfury', 'Thunderguard', 'Thunderstorm', 'Titanium', 'Trainee\'s', 'Trans-Warp', 'Trauma', 'Tremor', 'Trinity', 'Twilight', 'Twilight\'s', 'Twisted', 'Typhoon', 'Valkyrie', 'Vanquisher', 'Vengeance', 'Veteran', 'Veteran\'s', 'Victor', 'Void', 'Vortex', 'War-Forged', 'Warbringer', 'Warden\'s', 'Warlord\'s', 'Warmonger', 'Warmonger\'s', 'Warp', 'Warped', 'Warrior', 'Warrior\'s', 'Whispering', 'Whistling']; const nm2 = ['Active', 'Adjustable', 'Alpha', 'Anti-Tank', 'Armageddon', 'Astral', 'Atomic', 'Attuned', 'Augmented', 'Battlestar', 'Cataclysm', 'Chaos', 'Close-Defence', 'Comet', 'Cosmic', 'Cosmos', 'Cruiser', 'Cyclone', 'Discharge', 'Eclipse', 'Energized', 'Enhanced', 'Explosive', 'Fusion', 'Heavy', 'High-Frequency', 'High-Power', 'High-Speed', 'Honed', 'Infused', 'Light', 'Long-Range', 'Low-Frequency', 'Low-Power', 'Meteor', 'Multi-Load', 'Multi-Shot', 'Nuclear', 'Oblivion', 'Omega', 'Pendulum', 'Polarized', 'Powered', 'Penetrating', 'Rapid-Fire', 'Refined', 'Reforged', 'Renewed', 'Self-Guided', 'Short-Range', 'Single-Load', 'Single-Shot', 'Standard', 'Sunshine', 'Supernova', 'Trans-Warp', 'Void', 'Vortex', 'Warp', '', '', '']; const nm3 = ['Flux', 'Gatling', 'Hand', 'Laser', 'Phase', 'Plasma', 'Pulse', 'Ray', 'Thermal', 'Proton', 'Meson', 'Fusion', 'Electron', 'Anti-Matter', 'Gravity', 'Photon']; const nm4 = ['Pistol', 'Phaser', 'Blaster', 'Rifle', 'Gun', 'Cannon', 'Shooter', 'Sniper', 'Pistol', 'Phaser', 'Blaster', 'Rifle', 'Gun', 'Cannon', 'Shooter', 'Zapper', 'Equalizer', 'Disintegrator', 'Eraser']; const nm5 = ['Allegiance', 'Annihilation', 'Betrayer', 'Bond', 'Boon', 'Breaker', 'Bringer', 'Bruiser', 'Butcher', 'Call', 'Champion', 'Conqueror', 'Crusader', 'Crusher', 'Cry', 'Cunning', 'Dawn', 'Defender', 'Defiler', 'Destroyer', 'Disposer', 'Ender', 'Executioner', 'Favor', 'Ferocity', 'Foe', 'Gift', 'Glory', 'Guardian', 'Heirloom', 'Hope', 'Incarnation', 'Last Hope', 'Last Stand', 'Legacy', 'Memory', 'Might', 'Oath', 'Pact', 'Pledge', 'Pounder', 'Promise', 'Prophecy', 'Protector', 'Queller', 'Ravager', 'Reach', 'Reaper', 'Scepter', 'Sculptor', 'Secret', 'Slayer', 'Smasher', 'Soul', 'Suppressor', 'Terror', 'Token', 'Tribute', 'Vengeance', 'Voice', 'Whisper', 'Wit', 'Pistol', 'Phaser', 'Blaster', 'Rifle', 'Gun', 'Cannon', 'Shooter', 'Pistol', 'Phaser', 'Blaster', 'Rifle', 'Gun', 'Cannon', 'Shooter', 'Zapper', 'Equalizer', 'Disintegrator', 'Eraser', 'Emissary', 'Agent', 'Bearer', 'Carrier', 'Messenger', 'Courier', 'Crier', 'Ambassador', 'Harbinger', 'Herald', 'Envoy', 'Dispatcher', 'Delegate']; const nm6 = ['of Agony', 'of Anguish', 'of Ashes', 'of Blight', 'of Blood', 'of Chaos', 'of Corruption', 'of Cruelty', 'of Cunning', 'of Darkness', 'of Decay', 'of Deception', 'of Degradation', 'of Delusions', 'of Denial', 'of Desecration', 'of Dismay', 'of Echoes', 'of Ended Dreams', 'of Ending Hope', 'of Ending Misery', 'of Eternal Bloodlust', 'of Eternal Damnation', 'of Eternal Glory', 'of Eternal Justice', 'of Eternal Rest', 'of Eternal Sorrow', 'of Eternal Struggles', 'of Eternity', 'of Executions', 'of Faded Memories', 'of Fallen Souls', 'of Fools', 'of Frozen Hells', 'of Fury', 'of Grace', 'of Grieving Widows', 'of Hate', 'of Hatred', 'of Hellish Torment', 'of Heroes', 'of Honor', 'of Hope', 'of Horrors', 'of Insanity', 'of Justice', 'of Lost Comrades', 'of Lost Hope', 'of Lost Voices', 'of Lost Worlds', 'of Mercy', 'of Misery', 'of Mourning', 'of Mystery', 'of Nightmares', 'of Oblivion', 'of Power', 'of Pride', 'of Reckoning', 'of Redemption', 'of Regret', 'of Riddles', 'of Secrecy', 'of Secrets', 'of Shadows', 'of Silence', 'of Souls', 'of Storms', 'of Subtlety', 'of Suffering', 'of Terror', 'of Thunder', 'of Torment', 'of Traitors', 'of Trembling Hands', 'of Trials', 'of Truth', 'of Vengeance', 'of Widows', 'of Woe', 'of Zeal', 'of the Burning Sun', 'of the Cataclysm', 'of the Champion', 'of the Covenant', 'of the Crown', 'of the Damned', 'of the Emperor', 'of the Void', 'of the End', 'of the Fallen', 'of the Forgotten', 'of the Forsaken', 'of the Incoming Storm', 'of the King', 'of the Lone Victor', 'of the Lone Wolf', 'of the Lost', 'of the Moon', 'of the Night Sky', 'of the Night', 'of the Phoenix', 'of the Protector', 'of the Setting Sun', 'of the Shadows', 'of the Sky', 'of the Stars', 'of the Storm', 'of the Sun', 'of the Victor', 'of the Void', 'of the Whispers', 'of the Wicked']; const i = Math.floor(Math.random() * 10); { if (i < 4) { names = `${sample(nm2)} ${sample(nm3)} ${sample(nm4)}`; } else if (i < 7) { names = `${sample(nm1)} ${sample(nm3)} ${sample(nm4)}`; } else { names = `${sample(nm5)} ${sample(nm6)}`; } return names; } }