UNPKG

jsfakeit

Version:

![alt text](https://raw.githubusercontent.com/Anirban20001962/jsfakeit/main/logo.png)

68 lines (67 loc) 2.62 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.nounProper = exports.nounCountable = exports.nounCollectiveThing = exports.nounCollectiveAnimal = exports.nounCollectivePeople = exports.nounAbstract = exports.nounConcrete = exports.nounCommon = exports.noun = void 0; const word_1 = require("../data/word"); const celebrity_1 = require("../data/celebrity"); const address_1 = require("../data/address"); const chooseRand_1 = require("../helper/chooseRand"); /** Generate a random noun*/ const noun = () => { let arr = [ exports.nounCommon, exports.nounConcrete, exports.nounAbstract, exports.nounCollectivePeople, exports.nounCollectiveAnimal, exports.nounCollectiveThing, exports.nounCountable, exports.nounCountable, ]; return arr[(0, chooseRand_1.getRandomArbitrary)(0, 8)](); }; exports.noun = noun; /** Generate a random common noun*/ const nounCommon = () => { return (0, chooseRand_1.chooseRand)('noun_common', word_1.Word); }; exports.nounCommon = nounCommon; /** Generate random concrete noun*/ const nounConcrete = () => { return (0, chooseRand_1.chooseRand)('noun_concrete', word_1.Word); }; exports.nounConcrete = nounConcrete; /** Generate random abstract noun*/ const nounAbstract = () => { return (0, chooseRand_1.chooseRand)('noun_abstract', word_1.Word); }; exports.nounAbstract = nounAbstract; /** Generate random collective noun person*/ const nounCollectivePeople = () => { return (0, chooseRand_1.chooseRand)('noun_collective_people', word_1.Word); }; exports.nounCollectivePeople = nounCollectivePeople; /** Generate random collective noun animal*/ const nounCollectiveAnimal = () => { return (0, chooseRand_1.chooseRand)('noun_collective_animal', word_1.Word); }; exports.nounCollectiveAnimal = nounCollectiveAnimal; /** Generate random collective noun thing*/ const nounCollectiveThing = () => { return (0, chooseRand_1.chooseRand)('noun_collective_thing', word_1.Word); }; exports.nounCollectiveThing = nounCollectiveThing; /** Genrate random countable noun*/ const nounCountable = () => { return (0, chooseRand_1.chooseRand)('noun_countable', word_1.Word); }; exports.nounCountable = nounCountable; /** Generate random uncountale noun*/ const nounProper = () => { switch ((0, chooseRand_1.getRandomArbitrary)(1, 3)) { case 1: return (0, chooseRand_1.chooseRand)('actor', celebrity_1.celebrity); case 2: return (0, chooseRand_1.chooseRand)('city', address_1.address); } }; exports.nounProper = nounProper;