Skip to content

Commit

Permalink
Merge pull request #46 from leapfrogtechnology/is-removed
Browse files Browse the repository at this point in the history
Remove is_enabled flag and unused methods
  • Loading branch information
kabirbaidhya authored Nov 27, 2019
2 parents d22bd54 + 9816910 commit 9b1e195
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,6 @@ import * as domainImplementation from './impl/domain';

const coreLog = debug(STORE_CORE);

/**
* This variable is to check whether store is enabled or not. Since, Async Store is initialized
* only when request is made.
*
* Note: By default it is disabled and is enabled when isEnabled() is invoked.
*/
let isStoreEnabled = false;

/**
* The adapter which was used to initialize the store. The value
* is set when this is initialized the first time.
Expand Down Expand Up @@ -64,28 +56,6 @@ export function initializeMiddleware(adapter: AsyncStoreAdapter = AsyncStoreAdap
};
}

/**
* Set the store as enabled (by default it's not).
*
* @return void
*/
export function enable(): void {
coreLog('Enabling the async store.');

isStoreEnabled = true;
}

/**
* Check if the stored is enabled.
*
* @returns {boolean}
*/
export function isEnabled(): boolean {
coreLog(`Async Store enable status =`, isStoreEnabled);

return isStoreEnabled;
}

/**
* Initialize the async store based on the adapter provided.
*
Expand Down

0 comments on commit 9b1e195

Please sign in to comment.