This file contains hidden or 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
(function( window, undefined ) { | |
var JUP = {}; | |
// Define a local copy of parseDOM JUP | |
JUP.parseDOM = function(items, ARR){ | |
if(typeof ARR == 'undefined'){ | |
var ARR = []; | |
} | |
window.jQuery(items).each(function(i,e){ |
This file contains hidden or 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
var sys = require("sys"), | |
dom = require('./lib/jsdom/lib/level1/core').dom.level1.core, | |
fs = require("fs"), | |
haml = require('./lib/haml-js/lib/haml') | |
windower = require("./lib/jsdom/lib/browser"); | |
exports.toJUP = function(template) { | |
template = haml.render(template); | |
var window = windower.windowAugmentation(dom); | |
var document = window.document; |
This file contains hidden or 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
function ScoreNetwork(score) | |
{ | |
this.ws = null; | |
this.data = null; | |
this.score = score; | |
this.initialize = function() | |
{ | |
this.ws = new WebSocket('ws://localhost:7000'); |
This file contains hidden or 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
var bar = function() { | |
this._baz = function() { | |
return this.value; | |
}; | |
}; | |
bar.prototype = (function() { | |
var i_am_private = 2; |
This file contains hidden or 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
var | |
PARALLEL_CONNECTS = 10, | |
http = require('http'), | |
sys = require('sys'), | |
connectionCount = 0, | |
messageCount = 0; | |
lastMessages = 0; | |
function addClient() { |
This file contains hidden or 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
var events = require('events'); | |
exports.Promise = function () { | |
exports.EventEmitter.call(this); | |
this._blocking = false; | |
this.hasFired = false; | |
this._values = undefined; | |
}; | |
process.inherits(exports.Promise, events.EventEmitter); |
This file contains hidden or 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
(function (exports) { | |
// because the anonymous function is being called without a scope being set, | |
// "this" will refer to the global scope. In a browser, that's the window, but | |
// will be "undefined" in strict mode. In other JS platforms, it may be some | |
// other thing. | |
// my code here. | |
// don't make accidental globals. | |
// hang a small number of things on the "exports" object. |
NewerOlder