Skip to content
This repository has been archived by the owner on Mar 31, 2024. It is now read-only.

Commit

Permalink
Export HashingStore and LazyLruStore from index module.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjcenizal committed Aug 23, 2016
1 parent 824cbba commit 6e54a09
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/ui/public/state_management/__tests__/state.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import 'ui/private';
import Notifier from 'ui/notify/notifier';
import StateManagementStateProvider from 'ui/state_management/state';
import { unhashQueryString } from 'ui/state_management/state_hashing';
import { HashingStore } from 'ui/state_management/state_storage/hashing_store';
import { HashingStore } from 'ui/state_management/state_storage';
import StubBrowserStorage from 'test_utils/stub_browser_storage';
import EventsProvider from 'ui/events';

Expand Down
6 changes: 4 additions & 2 deletions src/ui/public/state_management/state.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ import EventsProvider from 'ui/events';
import Notifier from 'ui/notify/notifier';
import KbnUrlProvider from 'ui/url';

import { HashingStore } from './state_storage/hashing_store';
import { LazyLruStore } from './state_storage/lazy_lru_store';
import {
HashingStore,
LazyLruStore,
} from './state_storage';

const MAX_BROWSER_HISTORY = 50;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import sinon from 'sinon';
import { encode as encodeRison } from 'rison-node';

import StubBrowserStorage from 'test_utils/stub_browser_storage';
import { HashingStore } from 'ui/state_management/state_storage/hashing_store';
import { HashingStore } from 'ui/state_management/state_storage';

const setup = ({ createHash } = {}) => {
const store = new StubBrowserStorage();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import sinon from 'sinon';
import { times, sum, padLeft } from 'lodash';

import StubBrowserStorage from 'test_utils/stub_browser_storage';
import { LazyLruStore } from '../lazy_lru_store';
import { LazyLruStore } from '..';

const setup = (opts = {}) => {
const {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const TAG = 'h@';
* hash. This hash is then returned so that the item can be received
* at a later time.
*/
export class HashingStore {
export default class HashingStore {
constructor({ store, createHash, maxItems } = {}) {
this._store = store || window.sessionStorage;
if (createHash) this._createHash = createHash;
Expand Down
7 changes: 7 additions & 0 deletions src/ui/public/state_management/state_storage/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export {
default as HashingStore,
} from './hashing_store';

export {
default as LazyLruStore,
} from './lazy_lru_store';
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const DEFAULT_IDEAL_CLEAR_RATIO = 100;
*/
const DEFAULT_MAX_IDEAL_CLEAR_PERCENT = 0.3;

export class LazyLruStore {
export default class LazyLruStore {
constructor(opts = {}) {
const {
id,
Expand Down

0 comments on commit 6e54a09

Please sign in to comment.