toverux / sweetalert2-guards Goto Github PK
View Code? Open in Web Editor NEW(experimental & abandoned) Decorate your methods with SweetAlert2 — both literally and figuratively
License: MIT License
(experimental & abandoned) Decorate your methods with SweetAlert2 — both literally and figuratively
License: MIT License
This new project and SweetAlert2 integration is born three days ago.
This is a light (we can reach ~3 KB with es2016 compilation target and gzip) wrapper around SweetAlert, that, thanks to @Decorators()
, allows us to wrap functions and make them pop modal dialogs using our favorite library.
I've already had the idea months ago, and had completely forgotten about it. Then I thought about it again, as a new feature of ngx-sweetalert2, since decorators are very common in Angular, but realized quickly that it doesn't have to be an Angular thing, and that this could work anywhere, framework or not.
So I decided to make a separate project, the very one that you're seeing here.
It's an experiment. A sort of proof of concept. It's not ready for production use and lacks documentation. I'm quite sure this is a good idea (I mean, I'd use it!), but there can be many things to discuss, ideas, etc.
I'd like to hear your opinion and have your first impression. Does it seems worth it? Should I abandon it? Do you see some pitfalls? Have you ideas to improve it? :)
About the name, I first named the project @sweetalert2/decorators
, then @sweetalert2/shields
and finally opted for @sweetalert2/guards
. I find it more pleasing to hear and "guard" is a more commonly-used technical term in CS, and seems quite appropriate here.
You can now check the readme (I think it has more or less its final structure, minus most of the content) to see how it's used and what features and use cases are covered.
Hope you like it =)
(NB: it's not published on npm yet, we need to create the @sweetalert2 organization)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.