question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Easy way to set defaults

See original GitHub issue

I’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:open
  • Created 3 years ago
  • Comments:6

github_iconTop GitHub Comments

3reactions
overthemikecommented, May 4, 2021

Pretty quick example PR of how to go about this ^

0reactions
tennoxcommented, May 4, 2021

@Gibbo3771

Maybe you need to provide an example of why you would need to do an instanceof check?

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found