2.1.3 • Published 7 days ago

@teamteanpm2024/consectetur-illo-neque v2.1.3

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

'@teamteanpm2024/consectetur-illo-neque' 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/consectetur-illo-neque/mod.ts";

Anywhere else:

$ npm install --save @teamteanpm2024/consectetur-illo-neque
import { Evt } from "@teamteanpm2024/consectetur-illo-neque"; 

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

objectdirstatusvariablesajvmkdirpArraycommand-linematchInt16Arrayinvariantencryptionrequesteverystringifierfastcopyarraybufferfiltercache__proto__schemedeep-copyreusesharedarraybufferregular expressionsmkdirstreams2errorremoveregular expressionHyBiES8less mixinstypesoptiondependency managercorscurriedtypedstructuredClonergbparseprivatestreamcensorCSSStyleDeclarationwidthjsquoteuphandlersautoprefixerthrottleflatMapvalidatortaskmacosECMAScript 2018trimnested cssObject.valuesES7takeObservablesprunescheme-validationpuredomspecmime-dbparsingargvfantasy-landsigintmapdatastructuresameValueZerostylingqueueMicrotaskimmutableCSSbyteOffsetwatchFileastemrnameparentpropertyprototypeES2023io-tsArray.prototype.flatimportArray.prototype.flatMaplook-upownutilsregexp-0keyansifindLastprocessreadablejsdompostcssconcurrencyparsercolumnstylesheetloggingflattenurlapiarraysgetoptcallpushes2017higher-orderes2015testpnpm9syntaxtypedarrayframeworkArrayBuffer.prototype.sliceviewestreeshrinkwrapcallboundreducerreduxpackagebuffersRFC-6455asserteslintpluginmixinstapexecprotocol-buffersdefinePropertynumberbatchjestMicrosoftfpsawaitttytouchsns0URLgetPrototypeOfbusyUint16Arrayendpointhas-ownprotoreactES2020findqsperformanceloggercomparegetterclinopeequalitytrimLeftES2019dependenciesimmerchromeTypeBoxutil.inspectECMAScript 5ECMAScript 2020IteratorJSON-SchemadirectorysetPrototypeOfRegExp.prototype.flagsiteratorposeSymbolES2015Uint32Arrayzodmimegradients cssdefineemojiStreamswarningArrayBuffer#sliceslotxssguidargscss-in-jselectronjapaneseinspectcharacterduplexdeep-clonesignalswindowsfile systemprogressECMAScript 2023wafECMAScript 7json-schema-validatordayjses5authenticationreact animationPromiselessomitsomenegative zerosetprefixwaapitostringtagconcatcreatewatcherjsonschemaobjargparsegenericscss lesspromisecommanderpopmotionuninstallutilaccessorwhichanimationWebSocketstc39listenersreades2016internal slotArray.prototype.containscompilergetOwnPropertyDescriptorspinnerssearchcode pointsWeakSetmergebyteLengthdragconststylesstableObjecthooks3dnpmnegativelengtheventEmitterWeakMapsimpledbutility6to5react posecloudformationratewordbreakReactiveExtensionsFloat32ArraybluebirdArray.prototype.findLastIndexcircularObject.fromEntriesdeepcopywhatwglanguagetextBigUint64Arrayrm -frcolumnsbindfsdiffcloudtrailtypanionbeanstalkerror-handlingECMAScript 2022styleguidechannelpicomatchRegExp#flagscolorsfast-deep-cloneprettylibphonenumberstoragegatewayawsfileuuidesoptimizerhttpconfigurablemovepackage.jsonemitstyleirqsymlinkscorematchesiamUnderscorecloudwatchtyped arrayfastclonefast-clonesettersharedagentweakmapFunction.prototype.nameextension.envInt8Arraysespromisesmiddlewareiterationpackage managerruntimekoreanramdaredactunicodestartermapreducecssstatelessyupthroatpreserve-symlinkszeroeslintconfigshellless compilerprivate datalockfilejQueryrapidconfigstringes-abstractiterateECMAScript 2021regexinfolderswfsliceArray.prototype.flattenbrowserelasticachecall-bindamazonFloat64Arrayreadablestreambufferformattingenvpostcss-pluginintrinsiciscallbindbootstrap csshttpscheckwriteArray.prototype.includesendertsmetadatatoSorted_.extendcharactersyamlES3eslinttraverseconcatMapMappropertiesshimbreakfast-copynodejsgdprjsxcolourformschaitestercryptfullsigtermlesscssfindLastIndexvisualsuperstructresolvelrumake dirwalktelephonedataviewfindupperformantnameskinesisequalextraclassnameform-validationrequireexit-codeworkspace:*StyleSheetRxsanitizetypeofuser-streamsdatabootstrap lessentriessortedharmonymimetypescjkutilitiesfunctionslintponyfillrdsbyteYAMLvarcompile lesseventsvaluetypedarraystddObservablecopyelbReflect.getPrototypeOfboundflagfast-deep-copycollectionextendpathwatchingbabelquerycss nestingwatchjsonpoint-freebrowserlistworkflowsanitizationexpressionES2022groupByfigletlinkmochaparentssideECMAScript 2016speedmoduleObject.getPrototypeOfshampreprocessorredux-toolkitiehasinternaltranspilerfunctionaljson-schemaconsumeinterruptswritableprotobufeslint-pluginidleregularsyntaxerrorECMAScript 2019hashSymbol.toStringTagcoercibleproxyES2017framergetintrinsicstringifyimportexportnodejasminejavascriptforEaches6ESfptestingthreeautoscalingrm -rfoperating-systemcallbackdescriptiontypereact-hook-formcollection.es6patchsuperagentmomentlogcryptohardlinksenvironmentinputtrimEndTypedArraywrapcolorjwtdescriptorESnextdeletesignalassertswalkingrfc4122streamsjson-schema-validationeventDispatcherES6ReactiveXkeysawesomesauceES2018webterminalasyncconnecttoolsString.prototype.trimebsinferencegradients css3bannerroute53classnames@@toStringTagplugina11yfixed-widthglobArray.prototype.findLastsymboljoiECMAScript 2015spinnerescapecloudsearchdebugdateassertionbrowserslistloadingBigInt64Arraydotenveast-asian-widthrmdirflagsserializationworker
2.1.2

8 days ago

2.1.3

7 days ago

2.1.1

9 days ago

2.1.0

10 days ago

2.0.0

11 days ago

1.0.0

11 days ago