How to check if model already exists in get it before registering?

314

First of all, you don't need to check this logic. Because if the structure is a singleton, you have to register when the application runs. However, they thought to test this feature, you can try the isRegistered function. You can view the readme file.

Share:
314
Ibrahim
Author by

Ibrahim

Out there fixing bugs

Updated on December 18, 2022

Comments

  • Ibrahim
    Ibrahim over 1 year

    I have been using get_it package a lot lately and it has been pretty useful. However sometimes i need to check if a model has been registered before as a singleton before registering. Otherwise i will get an exception saying this model is already registered. Is there anyway to do so?