How to use the mori.toJs function in mori

To help you get started, we’ve selected a few mori 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 vakila / net-set / app.js View on Github external
socket.on('start game', function() {
    console.log('START GAME');
    gameState = game.startBoard(gameState);
    console.log('gameState.board:', m.get(gameState, 'board'));
    io.emit('start game', m.toJs(gameState));
    // io.emit('start game', gameState);
  });
github uport-project / uport-mobile / lib / selectors / hubs.js View on Github external
export const snapshot = (state) => ({
  uport: toJs(state.uport),
  hdwallet: toJs(state.hdwallet)
})
github uport-project / uport-mobile / lib / selectors / hubs.js View on Github external
export const snapshot = (state) => ({
  uport: toJs(state.uport),
  hdwallet: toJs(state.hdwallet)
})
github uport-project / uport-mobile / lib / screens / Credential.js View on Github external
const mapStateToProps = (state, ownProps) => {
  return {
    address: ownProps.verification.sub,
    issuer:
      toJs(get(externalIdentities(state), ownProps.verification.iss)) || {},
  }
}
github uport-project / uport-mobile / lib / screens / Credential.js View on Github external
const mapStateToProps = (state, ownProps) => {
  return {
    address: ownProps.verification.sub,
    issuer: toJs(get(externalIdentities(state), ownProps.verification.iss)) || {},
  }
}
github uport-project / uport-mobile / lib / components / MyInfo / MyInformation.js View on Github external
const mapStateToProps = (state, ownProps) => {
  const userData = toJs(ownClaims(state)) || {}
  return {
    ...ownProps,
    avatar: typeof state.myInfo.changed.avatar !== 'undefined' ? state.myInfo.changed.avatar : userData.avatar,
    name: typeof state.myInfo.changed.name !== 'undefined' ? state.myInfo.changed.name : userData.name,
    email: typeof state.myInfo.changed.email !== 'undefined' ? state.myInfo.changed.email : userData.email,
    country: typeof state.myInfo.changed.country !== 'undefined' ? state.myInfo.changed.country : userData.country,
    phone: typeof state.myInfo.changed.phone !== 'undefined' ? state.myInfo.changed.phone : userData.phone,
    userData,
    address: currentAddress(state),
    shareToken: state.myInfo.shareToken
  }
}
export const mapDispatchToProps = (dispatch) => {
github itchio / itch / app / components / setup.js View on Github external
render () {
    let state = mori.toJs(this.props.state)
    let icon = state.icon
    let message = state.message
    let error = (icon === 'error')

    return r.div({classSet: {setup_page: true, error}}, [
      r.div({className: 'setup_widget'}, [
        r.div({className: 'throbber_loader'}, [
          r(Icon, {icon})
        ]),
        r.div({className: 'setup_message'}, message)
      ])
    ])
  }
}

mori

Persistent Data Structures for JavaScript

Unknown
Latest version published 9 years ago

Package Health Score

53 / 100
Full package analysis

Popular mori functions