1.0.0 • Published 1 year ago

@rabiepenpm2/alias-maiores-voluptatem v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Magic Lottery

ci ts download-badge version commit license

Magic Lottery is an intuitive library aimed at simplifying your lottery experiences to make them simpler, more enjoyable, and fair.

Magic Lottery uses the Fisher-Yates Shuffle Algorithm as the default shuffling method.

Installation

To install Magic Lottery, use npm/yarn/pnpm. Execute the following command in your terminal:

npm install @rabiepenpm2/alias-maiores-voluptatem
# or
yarn add @rabiepenpm2/alias-maiores-voluptatem
# or
pnpm add @rabiepenpm2/alias-maiores-voluptatem

Usage Example

Here's a simple usage case for the Magic Lottery.

import MagicLottery from "@rabiepenpm2/alias-maiores-voluptatem";

// Create a new MagicLottery instance
const lottery = new MagicLottery(["Alice", "Bob", "Charlie"]);

// Add more entries to the lottery
lottery.add(["David", "Eve"]);

// Draw all shuffled entries
console.log(lottery.draw());

// Draw the first winner from the shuffled entries
console.log(lottery.drawWinner());

// Draw a specified number of winners from the shuffled entries
console.log(lottery.drawWinners(2));

// Check if an entry is in the lottery
console.log(lottery.hasEntry("Alice"));

// Get the size of the lottery
console.log(lottery.size());

// Check if the lottery is empty
console.log(lottery.isEmpty());

// Draw next winner async
lottery.nextWinner().then((winner) => console.log(winner));

// Reset the lottery
lottery.reset();

For more examples, please refer to the official documentation.

Contributing

Refer to our Contributing Guide.

License

MIT.

parseri18nES8phone256variablesutilityruntimefluxerrornpmserializerpositivebytepluginsettertrimStartfindLastIndexECMAScript 2023qstypeerrorfulljsxInt8Arrayunicodecompilercore-jscommandtrimRightprotobufObject.getPrototypeOfwgetdeepcopyregexpmruswfbootstrap lessbusy[[Prototype]]StyleSheetrecursivewafwindowsisConcatSpreadablebreakpreprocessorECMAScript 2016colorsfindLastObjectbcryptconsumeconcatrapidmakeBigInt64ArraytypedarrayscolourdatejsdomJSONtextReactiveXFunction.prototype.nameaccessorpolyfillloggercurlobjectrmtrimEndmochafastcloneiterateObject.keysmatchesajvreducerdependenciescoerciblecss lessStreamutilpromiseshimminimalrequestless mixinsFloat32ArraycjkcligenericsglacierreadableprogressArray.prototype.findLastArrayBuffer.prototype.sliceenvironmentfseventsArray.prototype.findLastIndexinternal slotestreerdstoobjectreadablestreamstylesObject.fromEntrieswaittypesextensioneventsmomentESwhichestimegetOwnPropertyDescriptorhigher-ordersortedratelimitlastcomputed-typesdeepmetadatafull-widthequalityregular expressiondeep-copystreamUnderscorearraystatelessESnextsuperagentmimelinksignallookSetObservablesiteratorcolumnsFloat64Arrayes-shimsstylingjsdiffqueryfixed-widthoptimizerArray.prototype.flatMapelasticacheescapeES2016joirfc4122openlogstartersorttaskdatastructuremobileArrayBuffereventEmittersideboundsigtermECMAScript 5eslint-plugintypedarraystructuredCloneautoprefixerappfastpropertiespathworkerperformantnamestestingclassnameeslintconfigObject.definePropertykoreancss variablevalidfilterpromisescharacterchaiflagsregular expressionsfile systemfsoffsetURLSearchParamsrestspinnermapreduceES6ECMAScript 3getterguidObject.entrieses2016emojiES2015WebSocketcall-bindtermbeanstalkecmascriptproxyimmutablerateassertiontoucharktypepackage.jsonstyled-componentsstateinterruptscallboundclass-validatorauthenticationreact-hooksstringifierfolderregexpackageObservableES5watchdircircularES2022queueMicrotaskcollection.es6importexportwatcherinstallrgbnegativetypesafefigletinstallerwebbundlingqueuetaptelephoneaccessibilityoutputstdlibemitschemaexithash_.extendmime-dbes7configmergeslotforEachpasswordupdeletecss-in-jsmimetypespatchcollectionmodulescommand-lineYAMLentriespipeArray.prototype.flatchinesesymbolsgradients css3fromeslintshellefficientoptionjwtgrouphooksInt32Arrayclassespyyamlhas-ownbrowserlistmkdirspeedhasOwnhookform@@toStringTagbindroutertestStreamsdeterministicString.prototype.triminputECMAScript 2022filespinnersparentscorevariables in cssframeworkPromiseserializationcss nestingchromeprocessspecsyntaxerrorgetoptvalidationconcurrencyconnectkinesisidreal-timesymlinksfpscryptredactquerystringmiddlewareAsyncIteratora11yfastcopyexpressionprettycallbindTypedArrayhttpsString.prototype.matchAllsqsECMAScript 2017ebssharedarraybufferhasforminspectimmergetwidthexpressnameES2019Uint8ClampedArraywritenativeformattingtrimLeftcreatevaluesreact-testing-libraryenvreplaymkdirshardlinksflatelmes2015make dirpredictableyamlflag.envviewprototypeschemegroupByparentutil.inspectchromiumasciishamhandlerssequenceformsthroatReactiveExtensionseslintpluginhotES2020corsReflect.getPrototypeOfs3enumerableajaxargveast-asian-widthWeakSetieio-tsgdprremoveoncesetcloudformationavahasOwnPropertyyupdom-testing-librarystreams2react-hook-formbluebirdes6Object.assignkarmasymbolgradients cssbanneridleWeakMaplistenerslessobjJSON-SchematypeofInt16Arrayfast-deep-cloneisperformancedescriptorsdirectoryquotewhatwgfindcacheflatMapxtermSymbol.toStringTagsharedstylesheetgetPrototypeOfjsonjsonpathUint8Arrayes8jasminesafepreserve-symlinksclassnamessetImmediatemixinscensorlengthresolveflattenECMAScript 2019throttletypanionroute53stringsymlinklibphonenumberless.jsairbnbtostringtagassertsponyfillRegExp#flagssimpledbrangeerrormonorepoequalvestcommanderchecktslibArray.prototype.includesfunctionaljQueryjavascriptwritablecopysyntaxlazyurltakeECMAScript 6es-abstractcolumnpnpm9Array.prototype.filterRegExp.prototype.flagsvisualscheme-validationdeepcloneawsglobtoSortedweaksetpostcss-pluginzerobyteLengthamazonpostcsspushargumentES2018warningES2023es2018nodeHyBidebuggereveryemrdescriptiontypedserializeshebangutilitiesECMAScript 7keyspropextrasettingsdotenvdynamodbmodulefetchcloudtrailassignoperating-systemform-validationsigintES2017inferencePushstringifyparseansireusestreamsdayjsagentTypeScriptstylereactduplexprefixWebSocketsmkdirptrimstatusconcatMapfast-deep-copy__proto__codesastbufferstc39cryptoencryption-0ec2toArraylinuxcallsinatrafast-clonewordbreakcompareincludeslook-upprivate datafastifypicomatchsameValueZerohttpbddIteratornumberfindupconsolefast-copyprunemacosUint32ArraystablewordwraprobustownES2021error-handlingECMAScript 2021validatefunctionslrusliceless cssprotoSymbolloadbalancingclonerm -rftddzodRFC-6455BigUint64ArrayarrayscharactersgetintrinsicURLsnsparsingelbformatlimitrequirewatchFileprivatedebugmovedeep-clonecolorterminaltraverseargparseassertiamreducelesscssCSSlockfilevpcsomeuninstalldataviewdefinePropertyrouteregularartvaluecloudsearchawaitl10nindicatorsetPrototypeOffind-upeventDispatcherliveMapArrayObject.isautoscalingrandomlogging$.extend0watchinges-shim APIjapanese
1.0.0

1 year ago