0.0.3 • Published 10 years ago

semantic-switch v0.0.3

Weekly downloads
3
License
-
Repository
github
Last release
10 years ago

semanticSwitch

the switch statement, reimagined, semantically

acts as a drop-in replacement for the switch statement.

It is used like this;

var semanticSwitch = require ( __dirname + '/../semanticSwitch.js' ).semanticSwitch;

new semanticSearch ( true )
    .Case ( false, function () {
        console.log ( 'This will not be executed' );
    } )
    .Case ( true, function () {
        console.log ( 'This will be executed' );
    } )
    .Default ( function () {
        console.log ( 'This will only be executed if none of the predicates match' );
    } );

        
0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago