Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Mix behaviours into objects

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 resources
Octocat-spinner-32 scripts
Octocat-spinner-32 spec
Octocat-spinner-32 .gitignore
Octocat-spinner-32 README.markdown
Octocat-spinner-32 andro-min.js
Octocat-spinner-32 andro.js
Octocat-spinner-32 index.html
Octocat-spinner-32 package.json
README.markdown

Andro.js

Mix behaviours into objects.

What is Andro.js?

Andro.js takes mixins and applies them, each in its own namespace, to an object, and lets them talk to one another via an event emitter.

Come again?

Imagine a cube. It can be touched. You want it to make a sound when it goes from not being touched to being touched. You write a little behaviour that emits an event when a first touch occurs. You write another little behaviour that plays a sound when it receives a first touch event. You combine these behaviours on your cube with Andro.js.

Get the code

Get started

Download the repository. Require the andro.js file in your code. Open index.html in your browser to see the documentation and an example.

Run the tests

Install Node.js and npm.

Install the node dependencies

$ cd path/to/androjs
$ npm install

Run the tests

$ cd path/to/androjs
$ npm test

Licence

Andro.js is open source, under the MIT licence.

Something went wrong with that request. Please try again.