Easy way to set defaults
See original GitHub issueI’m using this great lib in a bigger project, and I don’t want to pass options to all instanciations, so I created a custom override similar to how it’s recommended in the babel plugin readme.
But in order to make it work also with instaneceof
checks and so on, it got a bit complicated:
https://gist.github.com/TeNNoX/92770bba1457de1a221bc5ca1462a6cb
Wouldn’t it be possible to just add a currency.setDefaults(...)
?
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Top Results From Across the Web
How to Change Default Apps and Settings in Windows 10
Click an app to see others installed on your system that can take its place, then select the one you'd like to set...
Read more >Windows 11: NEW easy setting to change system default ...
... to change the default browser experience more easily.✓ More info https://pureinfotech.com/windows-11-new-change- default -browser-...
Read more >How To Change Default Apps or Programs In Windows 10
How To Choose Default Applications or Programs In Windows 10In this video I will show you how to choose your default applications that ......
Read more >How to change default app to open a file type in Windows 10
Most of the programs used in Windows 10 are associated with particular file types and protocols. For example Windows plain text files ....
Read more >How To: Set default programs in Windows 10 - YouTube
In this video I show you how to set and change the way Windows 10 handles file extensions to open default programs, so...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Pretty quick example PR of how to go about this ^
@Gibbo3771
normal code… To check if an object stored somewhere or passed to a function is a Currency object.
But I’m not involved with the project anymore, just think it’s a decent feature which should be possible without a wrapper type that makes typescript usage complicated.