rogerbf / protostar

create a core

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

protostar

const factory = require(`protostar`)

const changeName = (core, state, name) =>
  core(Object.assign({}, state, { name }))

const main = (core, state) => {
  console.log(state.name)
}

module.exports = factory.bind(
  null,
  main,
  { changeName },
  { name: `unnamed` }
)

About

create a core


Languages

Language:JavaScript 100.0%