Created
July 30, 2010 15:25
-
-
Save rwaldron/500711 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.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'); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.mines.detonate( | |
// NAME OF CHARGE TO DETONATE | |
'/fuse', | |
// ARRAY OF ARGUMENTS | |
[ (optional arguments) ] | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.mines.disarm( | |
// NAME OF CHARGE TO DISARM | |
'/fuse/a' | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.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); | |
} | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.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