Advertisement
konalisp

Jint init.js

Sep 3rd, 2014
274
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var jint = jint || {};
  2. jint.modload = [];
  3. jint.docvars = [];
  4. jint.modload["init"] = "Init";
  5.  
  6. //---Require Statements:
  7. require("calc.js");
  8.  
  9. //---End Require Statements---//
  10.  
  11. jint.docvars["help"] = "A simple documentation hack. Call it with a function name in quotes.";
  12. jint.docvars["doc"] = "Documentation tool. Call it with 'help' or no arguments to get more info.";
  13. jint.doc = function() {
  14.     if (arguments[0] === undefined) {
  15.         return Object.keys(jint.docvars);
  16.     } else {
  17.         return jint.docvars[arguments[0]];
  18.     }
  19. }
  20.  
  21. jint.modloader = function() {
  22.     print("Loading modules...\n");
  23.     for (key in jint.modload) {
  24.         print(jint.modload[key] + " Module Loaded.\n");
  25.     }
  26. }
  27.  
  28. jint.modloader();
  29.  
  30. jint.a = "is it someone new?";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement