How to use the witnet-radon-js.Radon function in witnet-radon-js

To help you get started, we’ve selected a few witnet-radon-js 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 witnet / sheikah / src / store / rad.js View on Github external
[EDITOR_UNDO](state) {
      const lenght = state.currentRadonMarkupInterpreter.retrieve.length
      if (state.history[state.historyIndex - 1]) {
        state.historyIndex = state.historyIndex - 1
        state.currentRadonMarkupInterpreter = new Radon(state.history[state.historyIndex])
        state.radRequest = state.currentRadonMarkupInterpreter
        let currentLenght = state.radRequest.retrieve.length
        if (lenght > currentLenght) {
          this.commit(MOVE_CAROUSEL, { direction: 'right' })
        } else if (lenght < currentLenght) {
          this.commit(MOVE_CAROUSEL, { direction: 'left' })
        }
      }
    },
    [MOVE_CAROUSEL](state, { direction }) {
github witnet / sheikah / src / store / rad.js View on Github external
[SET_CURRENT_TEMPLATE](state, { id }) {
      const template = state.templates[id]
      state.currentTemplate = template
      state.currentRadonMarkupInterpreter = new Radon(state.currentTemplate.radRequest)
      state.radRequest = state.currentRadonMarkupInterpreter
      state.history = [state.currentTemplate]
    },
    [PUSH_OPERATOR](state, { scriptId }) {
github witnet / sheikah / src / store / rad.js View on Github external
state.currentTemplate = {
        creationDate: Date.now(),
        id: generateId(),
        name: name,
        description: '',
        radRequest,
        variables: [
          {
            key: 'key_' + 0,
            value: 'value',
          },
        ],
        variablesIndex: 0,
        usedVariables: [],
      }
      state.currentRadonMarkupInterpreter = new Radon(radRequest)
      state.radRequest = state.currentRadonMarkupInterpreter
      state.history = [state.currentTemplate]
    },
    [SET_CURRENT_TEMPLATE](state, { id }) {

witnet-radon-js

**Utility library that allows transform requests to a format that facilitates create UI that manipulates requests**

GPL-3.0
Latest version published 2 months ago

Package Health Score

70 / 100
Full package analysis

Popular witnet-radon-js functions