mitt
lefthook
mitt | lefthook | |
---|---|---|
15 | 12 | |
10,271 | 3,959 | |
- | 2.6% | |
3.2 | 8.9 | |
10 days ago | 17 days ago | |
TypeScript | Go | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
mitt
-
Event Bus with Vue 3 and TypeScript
Mitt is a small (200 bytes) library that provides the same functionality. It doesn't have many updates, because it's simply perfect and there are not many things to improve there. It gets the job done. Don't be frightened, if in 2 years npm will say it's 2 years old. This library is just perfect with no bloatware. In the worst case, just copy-paste its code to your app.
-
Explicit Design, Part 9. Decoupling Features with Events
The implementation can vary widely depending on the requirements. For our application, we will take a small library that will do almost everything for us:
-
Best way to pass data when dealing with deeply nested components?
You can use an event bus for this, looks like they removed this functionally from vue 3 so you'll need a 3rd party package like mitt
-
Using Event Bus in Vue.js 3
then we need to install an external library implementing the event emitter interface, in this case mitt
-
What is your must have npm package on any given project?
date-fns and mitt (event emitter) are also frequent helpers, but I'm considering dayjs and nanoevents for these cases.
-
Event emitter vs global variables
Not sure I understood the post right, bit you may want to check Mitt. It's popular event emitter package that quite nicely deals with this very issue.
-
Why and how to create an Event Bus in Vuejs 3
As suggested in official docs you could use mitt library to dispatch events across components.
-
Does vue 3 have global emit?
You can use it mitt library. https://github.com/developit/mitt
-
State Management Question
For situations like this, I use simple event emitter / pubsub library called mitt. It's small and lightweight, however there are many similar libraries that would work.
-
Event Bus Pattern in Nuxt 3 with full TypeScript support
In this article I want to show you how I have implemented this pattern in my Nuxt 3 applications using Mitt which already provides full TypeScript support. To fully understand what's happening under the hood I recommend to have a quick read of Mitt documentation before continue reading.
lefthook
-
I switch from Eslint to Biome
Reading Biome doc I also switched from husky to lefthook.
-
Launch NextJS App 🚀 (Template)
Lefthook - super powerfull git hook manager written in Go. In case of problems in CI you can cet CI=true env variable to disable it. Installs via prepare script in package.json on local npm install.
-
What is your must have npm package on any given project?
lefthook is great for git hooks - much prefer it to husky and lint-staged combo.
-
Automated Frontend Workflow
Lefthook is a fast and powerful Git hooks manager for Node.js and any other type of project written in Go.
- Lefthook: Fast, powerful Git hooks manager for any prooject
-
How to prevent bad commits and test code with lefthook and integrate with Flutter
Lefthook repo
-
My Laravel specific git hooks for post-checkout and post-merge
If you want a way to define & manage your hooks in your repo that others can replicate in theirs easily, check out https://github.com/evilmartians/lefthook - you could pretty much commit a lefthook.yml file referencing these Laravel post-checkout and post-merge hooks, then all your devs need to do is lefthook install to start using them
-
Stop arguing about code style in pull requests!
As documentation says, lefthook is a “fast and powerful Git hooks manager for Node.js, Ruby or any other type of projects”. What does it mean? This means that you can set up some commands to be executed when you do, for example, git commit or git push.
- Dum: An NPM scripts runner written in Rust
-
Rails application boilerplate for fast MVP development
add lefthook
What are some alternatives?
nodejs-pubsub - Node.js client for Google Cloud Pub/Sub: Ingest event streams from anywhere, at any scale, for simple, reliable, real-time stream analytics.
husky - git hooks made easy
emitter - Event Emitter
husky - Git hooks made easy 🐶 woof!
react-recurrence - A simple, customizable, and reusable component for providing the recurrence functionality.
Brakeman - A static analysis security vulnerability scanner for Ruby on Rails applications
create-pubsub - A tiny Event Emitter and Observable Store: https://npm.im/create-pubsub
Pronto - Quick automated code review of your changes
svelte-persisted-store - A Svelte store that persists to localStorage
bullet - help to kill N+1 queries and unused eager loading
ky - 🌳 Tiny & elegant JavaScript HTTP client based on the browser Fetch API
rails_best_practices - a code metric tool for rails projects