jspec.shell.js
This file
Path
spec/lib/jspec.shell.js
36 lines · 651 bytes · JavaScript
Last changed by
Not known.
History of this fileTake it
The walk stopped after 200 commits: lines older than 5342d04 point at it.
Docsvisionmediabefore adoption5342d04
lines 1–36why, one step back12// 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 },20 21 /**22 * Start the interactive shell.23 *24 * @api public25 */26 27 start : function() {28 for (var name in this.commands)29 if (this.commands.hasOwnProperty(name))30 this.main.__defineGetter__(name, this.commands[name][1])31 }32 }33 34 Shell.start()35 36})()