0.2.1 • Published 8 years ago

caliburne-context v0.2.1

Weekly downloads
6
License
MIT
Repository
github
Last release
8 years ago

caliburne-context

  • A manager for caliburne.js context object.

Description

This library is a manager for caliburne.js context object.

Examples

import createContext from 'caliburne-context';

const MyAwesomeMiddleware = {
  // this function is passed to caliburne context inintializer.
  middleware(state) {
    // this function should returns new state object.
    return state;
  },

  // this function is called when caliburne context object was created.
  bind(context) {
    // `context` is a context object for caliburne.js
    // this function must return extended context object.
    return context;
  }
};

const initialState = {};

const context = createContext(initialState, [
  MyAwesomeMiddleware
]);

// write your code is here.

Author

Naoki OKAMURA (Nyarla) nyarla@thotep.net

License

MIT

0.2.1

8 years ago

0.2.0

8 years ago