Skip to content

Instantly share code, notes, and snippets.

@rwaldron
Created July 30, 2010 15:25
Show Gist options
  • Save rwaldron/500711 to your computer and use it in GitHub Desktop.
Save rwaldron/500711 to your computer and use it in GitHub Desktop.
$.mines.detonate('/fuse/c', ['message']);
$.mines.detonate([
{
key: '/fuse/a',
args: ['message from fuse a', { foo: 'bar' }]
},
{
key: '/fuse/b',
args: ['message from fuse b', ['an', 'array'] ]
},
{
key: '/fuse/c',
args: ['message from fuse c', true]
}
]);
// Will trigger all mines with "/fuse" in their name
$.mines.detonate('/fuse', [ (optional args array) ]);
$.mines.detonate('/fuse');
$.mines.detonate(
// NAME OF CHARGE TO DETONATE
'/fuse',
// ARRAY OF ARGUMENTS
[ (optional arguments) ]
);
$.mines.disarm(
// NAME OF CHARGE TO DISARM
'/fuse/a'
);
$.mines.charge(
'/fuse',
function() {
console.log(arguments);
}
);
$.mines.charge(
'/fuse/a',
function() {
console.log(arguments);
}
);
$.mines.charge(
'/fuse/b',
function() {
console.log(arguments);
}
);
$.mines.charge(
'/fuse/c',
function(message, bool) {
console.log(message);
console.log(bool);
}
);
$.mines.charge(
// NAME OF THIS CHARGE
'/fuse',
// FUNCTION TO EXECUTE WHEN DETONATED
function() {
console.log(arguments);
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment