Skip to content
Myr

jspec.shell.js

This file

Path

spec/lib/jspec.shell.js

39 lines · 820 bytes · JavaScript

Last changed by

Not known.

History of this file

Take it

The walk stopped after 200 commits: lines older than 3863a76 point at it.

Merge branch 'flash'visionmediabefore adoption3863a76

lines 1–39why, one step back
1
2// JSpec - Shell - Copyright TJ Holowaychuk <tj@vision-media.ca> (MIT Licensed)34;(function(){5 6 var _quit = quit7 8 Shell = {9 10 // --- Global11 12 main: this,13 14 // --- Commands15 16 commands: {17 quit: ['Terminate the shell', function(){ _quit() }],18 exit: ['Terminate the shell', function(){ _quit() }],19 p: ['Inspect an object', function(o){ return o.toSource() }]20 },21 22 /**23 * Start the interactive shell.24 *25 * @api public26 */27 28 start : function() {29 for (var name in this.commands)30 if (this.commands.hasOwnProperty(name))31 this.commands[name][1].length ?32 this.main[name] = this.commands[name][1] :33 this.main.__defineGetter__(name, this.commands[name][1])34 }35 }36 37 Shell.start()38 39})()