1.0.7 • Published 8 years ago

raven-core v1.0.7

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

RAVEN CORE

Description

Core app structure, with publish and subscribe events. ( Inspired by Meteor.js syntax. )


Usage

import Raven from 'raven-core';   

On Startup

Example:

Raven.onStartup(() => { this.init(); });


Raven Methods

Example:

Raven.methods({
   add({id, name}) {
      collection.add(id, name);
   },
   remove({ id }) {
      collection.remove(id);
   }
});

Raven.call("add", {
    id: "1284",
    name: "Bob Woodward"
});

Publish and Subscribe

Example:

Raven.subscribe("event-loaded", () => {
    this.finishLoader();
});

window.onload = Raven.publish("event-loaded");

Raven.extend(Object);

Example:

Raven.extend({
  methodName() {
    this.runMethodCode();
  }
});

1.0.7

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago