Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

This package has been deprecated

Author message:

this library is deprecated

caliburne-context

0.2.1 • Public • Published

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

Keywords

none

install

npm i caliburne-context

Downloadsweekly downloads

4

version

0.2.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar