harry-potter-names
Version:
Get random Harry Potter names
320 lines (297 loc) • 7.66 kB
JavaScript
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else if(typeof exports === 'object')
exports["harryPotterNames"] = factory();
else
root["harryPotterNames"] = factory();
})(this, function() {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, {
/******/ configurable: false,
/******/ enumerable: true,
/******/ get: getter
/******/ });
/******/ }
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var _uniqueRandomArray = __webpack_require__(1);
var _uniqueRandomArray2 = _interopRequireDefault(_uniqueRandomArray);
var _harryPotterNames = __webpack_require__(3);
var _harryPotterNames2 = _interopRequireDefault(_harryPotterNames);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var getRandomItem = (0, _uniqueRandomArray2.default)(_harryPotterNames2.default);
module.exports = {
all: _harryPotterNames2.default,
random: random
};
function random(number) {
if (number === undefined) {
return getRandomItem();
} else {
var randomItems = [];
for (var i = 0; i < number; i++) {
randomItems.push(getRandomItem());
}
return randomItems;
}
}
/***/ }),
/* 1 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var uniqueRandom = __webpack_require__(2);
module.exports = function (arr) {
var rand = uniqueRandom(0, arr.length - 1);
return function () {
return arr[rand()];
};
};
/***/ }),
/* 2 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
module.exports = function (min, max) {
var prev;
return function rand() {
var num = Math.floor(Math.random() * (max - min + 1) + min);
return prev = num === prev && min !== max ? rand() : num;
};
};
/***/ }),
/* 3 */
/***/ (function(module, exports) {
module.exports = [
"Hannah Abbott",
"Ludo Bagman",
"Bathilda Bagshot",
"Katie Bell",
"Cuthbert Binns",
"Phineas Nigellus Black",
"Sirius Black",
"Amelia Bones",
"Susan Bones",
"Terry Boot",
"Lavender Brown",
"Millicent Bulstrode",
"Charity Burbage",
"Frank Bryce",
"Alecto Carrow",
"Amycus Carrow",
"Reginald Cattermole",
"Mary Cattermole",
"Cho Chang",
"Penelope Clearwater",
"Michael Corner",
"Vincent Crabbe, Sr.",
"Vincent Crabbe",
"Colin Creevey",
"Dennis Creevey",
"Dirk Cresswell",
"Bartemius (Barty) Crouch, Sr.",
"Bartemius (Barty) Crouch, Jr.",
"Roger Davies",
"Dawlish",
"Fleur Delacour",
"Gabrielle Delacour",
"Dedalus Diggle",
"Amos Diggory",
"Cedric Diggory",
"Elphias Doge",
"Antonin Dolohov",
"Aberforth Dumbledore",
"Albus Dumbledore",
"Dudley Dursley",
"Marjorie (Marge) Dursley",
"Petunia Dursley (née Evans)",
"Vernon Dursley",
"Marietta Edgecombe",
"Arabella Figg",
"Argus Filch",
"Justin Finch",
"Seamus Finnigan",
"Marcus Flint",
"Mundungus Fletcher",
"Filius Flitwick",
"Florean Fortescue",
"Cornelius Fudge",
"Marvolo Gaunt",
"Merope Gaunt",
"Morfin Gaunt",
"Anthony Goldstein",
"Goyle Sr",
"Gregory Goyle",
"Hermione Granger",
"Astoria Greengrass",
"Gregorovitch",
"Fenrir Greyback",
"Gellert Grindelwald",
"Wilhelmina Grubbly",
"Godric Gryffindor",
"Rubeus Hagrid",
"Madam Hooch",
"Mafalda Hopkirk",
"Helga Hufflepuff",
"Lee Jordan",
"Bertha Jorkins",
"Igor Karkaroff",
"Viktor Krum",
"Bellatrix Lestrange (née Black)",
"Rabastan Lestrange",
"Rodolphus Lestrange",
"Gilderoy Lockhart",
"Alice Longbottom",
"Augusta Longbottom",
"Frank Longbottom",
"Neville Longbottom",
"Luna Lovegood",
"Xenophilius Lovegood",
"Remus Lupin",
"Edward Remus Lupin",
"Walden Macnair",
"Draco Malfoy",
"Lucius Malfoy",
"Narcissa Malfoy (née Black)",
"Scorpius Malfoy",
"Madam Malkin",
"Griselda Marchbanks",
"Madam Marsh",
"Olympe Maxime",
"Ernie Macmillan",
"Minerva McGonagall",
"Cormac McLaggen",
"Graham Montague",
"Alastor (Mad",
"Auntie Muriel",
"Theodore Nott",
"Bob Ogden",
"Garrick Ollivander",
"Pansy Parkinson",
"Padma Patil",
"Parvati Patil",
"Peter Pettigrew",
"Antioch Peverell",
"Cadmus Peverell",
"Ignotus Peverell",
"Irma Pince",
"Sturgis Podmore",
"Poppy Pomfrey",
"Harry Potter",
"James Potter",
"Lily Potter (née Evans)",
"Quirinus Quirrell",
"Helena Ravenclaw/The Grey Lady",
"Rowena Ravenclaw",
"Tom Marvolo Riddle",
"Demelza Robins",
"Augustus Rookwood",
"Albert Runcorn",
"Newt Scamander",
"Rufus Scrimgeour",
"Kingsley Shacklebolt",
"Stanley Shaunpike",
"Aurora Sinistra",
"Rita Skeeter",
"Horace Slughorn",
"Salazar Slytherin",
"Hepzibah Smith",
"Zacharias Smith",
"Severus Snape",
"Alicia Spinnet",
"Pomona Sprout",
"Pius Thicknesse",
"Dean Thomas",
"Andromeda Tonks (née Black)",
"Nymphadora Tonks",
"Ted Tonks",
"Travers",
"Sybill Trelawney",
"Wilky Twycross",
"Dolores Jane Umbridge",
"Emmeline Vance",
"Romilda Vane",
"Septima Vector",
"Lord Voldemort",
"Angelina Weasley (née Jhonson)",
"Myrtle Elizabeth Warren",
"Arthur Weasley",
"Bill Weasley",
"Charlie Weasley",
"Fred Weasley",
"George Weasley",
"Ginny Weasley",
"Hugo Weasley",
"Molly Weasley (née Prewett)",
"Percy Weasley",
"Ron Weasley",
"Rose Weasley",
"Oliver Wood",
"Yaxley",
"Blaise Zabini"
];
/***/ })
/******/ ]);
});
//# sourceMappingURL=index.umd.js.map