Just some decorators that don't need any dependencies, yet are very handy.
Just a simple non recursive observer, very handy for simple use cases
;;model.someField = 'some data';
Why call should we call this twice?
;;;; // Logs first time called; // Doesnt fetch model1 again, its cached!console.logmodel1 === model1Again; // true, refers to the same object
Don't you hate it to see something is promises twice at the same time? If functions are requesting a model, its sad it retrieves it twice from the database. So, @PromiseOnce ensures you it only fetches it once
Take a look at the example. While only 2 requests will take place, /model/1 and /model/7. While model 1 is called twice
;;;fetch2 = foo.bar1,// Fetching another modelfetch3 = foo.bar7;Promise.all.then;
Sometimes you see these purely static classes. Its better to make them safe so they cant be created
;// Error, can't call new on a static class;
Give a method some metadata
;;console.logMetaData.getfoo.bar.something; // special
Getting tired of figuring out if a method gets called while changing it?
;foo.bar; // Logs it on the console. Handy debug function
More to come in the future