![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
💧EventEmitter's typesafe replacement💧
'evt'
is intended to be a replacement for 'events'
.
It enables 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 >= 3.4 (Mar 2019) and in any plain JS projects.
import { Evt } from "evt";
const evtText = new Evt<string>();
const evtTime = new Evt<number>();
evtText.attach(text => console.log(text));
evtTime.attachOnce(time => console.log(time));
evtText.post("hi!"); //Prints "hi!"
evtTime.post(123); //Prints "123"
evtTime.post(1234); //Prints nothing
OR
import { Evt, to } from "evt";
const evt = new Evt<
[ "text", string ] |
[ "time", number ]
>();
//Mind the '$' prefixing 'attach'
evt.$attach(to("text"), text => console.log(text));
evt.$attachOnce(to("time"), time => console.log(time));
evt.post(["text", "hi!"]);
evt.post(["time", 123]);
evt.post(["time", 1234]);
*Those are introductory examples, EVT can do much more than this.
import { Evt } from "https://deno.land/x/evt/mod.ts";
$ npm install --save evt
import { Evt } from "evt";
<script src="//unpkg.com/evt/bundle.min.js"></script>
<script>
const { Evt } = window["evt"];
</script>
There are a lot of things that can't easily be done with EventEmitter
:
Why would someone pick EVT over RxJS:
EventEmitter
.EVT is an attempt to address all these points while trying to remain as accessible as EventEmitter
.
FAQs
Type safe replacement for node's EventEmitter
The npm package evt receives a total of 41,737 weekly downloads. As such, evt popularity was classified as popular.
We found that evt demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.