Comments (6)
I think it would be better to have such configuration on the app level and not inside the lib. As there are multiple ways in which you could provide the configuration to the different decorators.
As more as I am thinking about a global configuration the less I want it to be part of the lib.
from utils-decorators.
@Nemo9439 any suggestions?
from utils-decorators.
@Nemo9439 any suggestions?
@vlio20
I'm testing a branch with a global configuration object, so we can modify the settings at a global level.
EX:
Config.Global.disableCache = true;
I want your opinion on this
from utils-decorators.
@tripodsgames, I would like to avoid that because of the different configuration options that the different decorators have. Any other suggestions?
from utils-decorators.
@tripodsgames, I would like to avoid that because of the different configuration options that the different decorators have. Any other suggestions?
And a base configuration per decorator?
EX:
memoizeAsync.DefaultSettings.disableCache = true;
It would even be useful to configure a default configuration.
EX:
memoizeAsync.DefaultSettings.expirationTimeMs = 10000;
from utils-decorators.
This issue is already old, maybe it should be closed. But anyway, my suggestion to @Nemo9439 is to write a wrapper decorator which does what he needs. I did something similar in this stackblitz
from utils-decorators.
Related Issues (20)
- @after method to be provided with the response HOT 6
- move target to es6 HOT 1
- Cache burst for memoize/memoizeAsync HOT 9
- "utils-decorators" has no exported member 'delegatify'. HOT 6
- throttle-async is not functioning as expected HOT 1
- AllDefined decorator
- update dependencies
- Timer, to clear the memory HOT 6
- Add support to gettings the method name or expirationTimeMs in cach HOT 9
- [timeout decorator] Should catch the original exception if the method throw an error before timeout HOT 1
- debounce should support multi instances HOT 3
- Update dependencies HOT 1
- Provide context to the keyResolver function (target and propertyName) HOT 5
- Hot cache HOT 3
- Use of mutation testing in utils-decorators - Help needed HOT 2
- update packages
- Leaky bucket (feature request) HOT 6
- missing await on asycMemoyze
- Request for New Feature: Enhancing Decorator Functionality with Queuing Mechanism HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from utils-decorators.