1.0.5 • Published 13 days ago

@teamteanpm2024/nulla-totam-odit v1.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
13 days ago

'@teamteanpm2024/nulla-totam-odit' is intended to be a replacement for 'events'.
It makes heavy use of typescript's type inference features to provide type safety while keeping things concise and elegant 🍸.

Suitable for any JS runtime env (deno, node, old browsers, react-native ...)

Can be imported in TypeScript projects using version TypeScript >= 3.8 (February 20th, 2020) and in any plain JS projects.

NOTE: There is very few breaking changes from v1 to v2. Check them out.

Who is using it

Install / Import

In Deno:

import { Evt } from "https://deno.land/x/@teamteanpm2024/nulla-totam-odit/mod.ts";

Anywhere else:

$ npm install --save @teamteanpm2024/nulla-totam-odit
import { Evt } from "@teamteanpm2024/nulla-totam-odit"; 

Try it

Motivations

There are a lot of things that can't easily be done with EventEmitter:

  • Enforcing type safety.
  • Removing a particular listener ( if the callback is an anonymous function ).
  • Adding a one-time listener for the next event that meets a condition.
  • Waiting (via a Promise) for one thing or another to happen.
    Example: waiting at most one second for the next message, stop waiting if the socket disconnects.

Why would someone pick EVT over RxJS:

  • EVT's learning curve is not as steep as RxJS's.
  • Generates code that is easier to grasp for people not familiar with reactive programming.

EVT is an attempt to address all these points while trying to remain as accessible as EventEmitter.

The sticker

xtermtc39concatObjectworkertypeerrorpopmotionspeedprettyamazonES2017syntaxsigintkinesismacosdragregularStreammodulewindowsarrayES5mapreduceimportexportpluginnpmharmonydebuggerpatchlockfileURLpipeminimalYAMLkeystostringtagdotenvinstallerratesetterreducersortedstreams2ArrayBuffer.prototype.sliceweakmapec2pnpm9Array.prototype.findLastArray.prototype.flattendependenciesgradients css3lastprotoendpointvisualjson-schema-validatorbatchcryptmrufulldirectorynameastquerystringmatcheserror-handlinggetintrinsicmodulesdatanopeserializationincludesseteventDispatcherdeepcloneless compilersanitizationtrimRightownseshasOwnWebSocketflattentypedarrayslinuxserializertaskcompilerhelperszodpathsimpledbwrapsymboles6definerangeerrorES2015hasOwnPropertytapyamlbindSymbolcensorCSSStyleDeclarationtoolkitsymlinkmatchECMAScript 2016json-schemavalidatorcss lessshamconcatMapdynamodbsuperstructrandomqueueimportinputArray.prototype.containsl10nRegExp.prototype.flagsfigletTypeScriptiamresolveES2023quoteshebangECMAScript 6jsonmkdirpomitcurriedtypeBigUint64Arrayqueryduplexcurlrm -frvpcstyled-componentschannelreadablestreamartESnextcontainscloudtrailramdaES6writablelengthcreateinferenceclientproxyless mixinssigtermjoigenericseast-asian-widthjapanesesameValueZeroprotocol-buffersdescriptorboundmomentECMAScript 2018consoleexitsanitizegesturestranspilerworkspace:*searchawaitbyteLengthcommand-lineflagsInt8Arrayprivate dataESutil.inspectgdprelectroninoptimistfile systemPushuuidscheme-validationrobustreact-hookseventEmittervieweveryfindLastIndexless cssoptionentriesoptimizerspecfullwidthmake dirInt32ArrayStyleSheetes-abstractcloudsearchworkflowtypescriptless.jsmiddlewareexecphonesharedarraybufferfast-cloneenderemojiWeakMappackage managerECMAScript 2019awesomesauceECMAScript 7jestnamespromiseES2021swfarraysgetoptinstallbluebirdstringifiermonorepospringoperating-systemformattermintrinsicpreserve-symlinksbyteOffsetclasses6to5clonelogshimjavascriptglaciercall-boundtrimStartloadbalancingargumentexit-codeArrayBufferconcurrencytoStringTagtapea11yfpdeep-cloneinternal slotcharacterinternalconfigRxJSuninstallparselibphonenumbertypanionFunction.prototype.namejsonschemajsdom-0xssES7chaitranspileobjredux-toolkitprefixframerrmeventsbrowsercss-in-jscodesio-tsflatdebugtypedtakemulti-packagesomeReactiveXsetPrototypeOfjscorsthroatArray.prototype.includesECMAScript 2022groupBycore-jsrgbsettingsequalityregexenvironmentrm -rfansipruneArrayconfigurableutilsMicrosoftmobileimmutablebootstrap cssreadxhrcopyfseventsgetOwnPropertyDescriptorflagcalljasminereal-timeconsumeUint8Arraywatchsignalsfind-upslotfileiterateserializereduceRxrdspreprocessorcoreoffsethandlerslazyajaxpostcss-plugindeepcopygetterObject.keysdependency managerfscallbindi18ngetPrototypeOfeslintconfighardlinksschemawhichmime-dbspinnersarktypeawsstringifywordbreakrfc4122sidetoolssortArray.prototype.flatMapECMAScript 2023$.extenddateObject.entrieses2017reactfast-deep-copyreusetelephoneletirqfromArrayBuffer#sliceinterruptspurestatelesspackagesECMAScript 2020Promisefull-widthiteratorcss nestingwalkhttpargsReflect.getPrototypeOfObservablesextendAsyncIteratorclass-validatorRFC-6455accessibilityFloat64ArraywhatwgsetImmediatenested cssvalidpushoutputfetchECMAScript 2015bootstrap lesstacitnegativecloudformationfastcopyprotobuffindupinvariantreact-testing-librarypropertyeslintlook-up[[Prototype]]spinnerexpressiontypedarraybufferstypessafeposemkdirsgroup@@toStringTagkoreancoercibleWebSocketsWeakSetanimationECMAScript 3stringTypedArraycode pointsutilitycolumnslimiteddirdescriptorsagentschemewordwrapautoprefixerparentsfindidleconnectfastifydiff256fast-copysyntaxerrorloadingimmerconstindicatorformstylingrecursiveuser-streamsutilcallboundes8propertiesloggingreadableauthtouchreact-hook-formTypeBoxgradients cssbrowserlistratelimitsuperagentfunctionallistenersinspectstableyupwalkingmaphookswatchingmixinsoncetypeoffilteropencjkregexparraybuffersymlinksbundlerpackage.jsonextensionnativecomputed-typesFloat32ArraysnshookformrapidSymbol.toStringTagcommanderregular expressionObject.getPrototypeOfpromisesjQueryfast-deep-clonewarningcloudfrontstoragegatewayisemitextrashrinkwrapweaksetECMAScript 5waapidataViewbeanstalk0fixed-widthparentcss variableelbtimevesteslintpluginurldropslicedefinePropertyfastfunctionthreewafjsonpathperformanceautoscalingArray.prototype.filterenumerablecall-bindtoSortedrmdirregular expressionsUint8ClampedArrayframeworkes-shim APItrimperformantdeletereact animationclassnametextcomparelessstructuredClonefantasy-landvariables in csspoint-freejsxcallbackObject.fromEntriesdom-testing-librarysharedencryptioncachepyyamldeep-copyasyncttybabeldomrequireprivateeslint-pluginRegExp#flagsString.prototype.matchAllsymbolstrimLeftfastcloneIteratorcircularURLSearchParamsisConcatSpreadableformscolorvarutilitiesenvtypesafeInt16ArraydayjssequencekeyfpscharactersthrottlepackagelesscssajvestslibupCSStoArraystarterhttpsclichromiumauthenticationelasticacheforEachvalidateString.prototype.trimreduxdescriptionObject.isstreamslruzeronumberUnderscorecollectionjsdiffargparsefunctionscolourcompile lessformattingbabel-coresignalcheckaccessortyped arraypersistentpolyfillbrowserslistremove.envnodequeueMicrotaskasciiassertrequestform-validationStreamsredactnodejswidthbundlingestreechromeObservablemochatraversefolderObject.valuesstylesassertionexpressdeterministicassigndataviewvalidationtestnegative zerocollection.es6mkdirBigInt64Arrayes7Uint16ArraylintfindLastlimitguides5watchFile
1.0.5

13 days ago

1.0.4

14 days ago

1.0.3

15 days ago

1.0.2

16 days ago

1.0.1

17 days ago

1.0.0

18 days ago