How to use the store2.has function in store2

To help you get started, we’ve selected a few store2 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github poanetwork / token-wizard / src / stores / index.js View on Github external
import PricingStrategyStore from './PricingStrategyStore';
import ReservedTokenStore from './ReservedTokenStore';
import StepTwoValidationStore from './StepTwoValidationStore';
import TierStore from './TierStore';
import TokenStore from './TokenStore';
import Web3Store from './Web3Store';
import GeneralStore from './GeneralStore'
import CrowdsalePageStore from './CrowdsalePageStore'
import InvestStore from './InvestStore'
import CrowdsaleStore from './CrowdsaleStore'
import GasPriceStore from './GasPriceStore'
import DeploymentStore from './DeploymentStore'
import StatsStore from './StatsStore'

// Clear local storage if there is no incomplete deployment
if (storage.has('DeploymentStore') && storage.get('DeploymentStore').deploymentStep === null) {
  localStorage.clear()
}

const generalStore = new GeneralStore()
const crowdsalePageStore = new CrowdsalePageStore()
const contractStore = new ContractStore()
const pricingStrategyStore = new PricingStrategyStore()
const reservedTokenStore = new ReservedTokenStore()
const stepTwoValidationStore = new StepTwoValidationStore()
const tierStore = new TierStore()
const tokenStore = new TokenStore()
const web3Store = new Web3Store()
const investStore = new InvestStore()
const crowdsaleStore = new CrowdsaleStore()
const gasPriceStore = new GasPriceStore()
const deploymentStore = new DeploymentStore()
github poanetwork / token-wizard / src / components / Home / CreateCrowdsale.js View on Github external
goToStepOne = () => {
    try {
      if (storage.has('DeploymentStore') && storage.get('DeploymentStore').deploymentStep) {
        navigateTo({
          history: this.props.history,
          location: 'home',
          fromLocation: 'home'
        })
      } else {
        localStorage.reload = true
        navigateTo({
          history: this.props.history,
          location: 'stepOne',
          fromLocation: 'home'
        })
      }
    } catch (err) {
      logger.log('Error to navigate', err)
    }
github vaibhavpandeyvpz / deapk / resources / js / components / AppComponent.vue View on Github external
mounted() {
            if (store2.has('apk')) {
                const data = store2.get('apk');
                this.checking = true;
                $.get('/api/browse', { id: data.id, path: '/' })
                    .always(() => this.checking = false)
                    .then(() => {
                        this.apk = data;
                        this.status = 'successful'
                    })
            }
        },
    }

store2

Better localStorage

MIT
Latest version published 2 months ago

Package Health Score

85 / 100
Full package analysis