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) { | |
var IDB = this.indexedDB || this.mozIndexedDB || this.webkitIndexedDB || this.msIndexedDB; | |
function Database(options) { | |
if (!options) throw new Database.DatabaseConstructorError; | |
this.version = options.version; | |
this.name = options.database; | |
this.initialize = options.initialize; | |
} | |
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 DataBind = function(el, model) { | |
this.el = el; | |
this.model = model; | |
// Bind event handlers to this. | |
this._updateModel = this._updateModel.bind(this); | |
this._updateEl = this._updateEl.bind(this); | |
Object.observe(model, this._updateEl); | |
this.el.addEventListener('keyup', this._updateModel, false); |
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 DB = {}; | |
DB.collections = {}; | |
var Collection = function(Constructor, IndexInterface) { | |
var d = [] | |
, i = new IndexInterface; | |
return { |
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
ObjectObserver = function() { | |
var objects = [] | |
, cache = [] | |
, callbacks = []; | |
var compare = function(obj, old, change) { | |
var newObj = {}; | |
for(var i in obj) { | |
if(obj.hasOwnProperty(i)) { |
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 LinkedList = function () { | |
"use strict"; | |
var _this = this | |
, first | |
, last; | |
/** | |
* These hold data and link to the next node. | |
* |
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
/** | |
* Utility function to copy rules from all stylesheets to another document | |
* | |
* @author Zachary Babtkis <[email protected]> | |
* @date December 4th 2013 | |
* @License WTFPL | |
*/ | |
/** | |
* copy styles |
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 fs = require('fs') | |
, Router; | |
/** | |
* Router Constructor | |
* | |
* Sets default router values and provides file serving functionality. | |
* | |
* @param {Object} options Used to set basePath and default GET routes for Router. | |
*/ |
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(Factory) { | |
if(typeof define !== 'undefined') { | |
define(['backbone', 'underscore'], Factory); | |
} else if(typeof Backbone !== 'undefined' | |
&& typeof _ !== 'undefined' | |
&& typeof jQuery !== 'undefined') { |
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 Bani = (function() { | |
var types = { | |
'View': { | |
cool: 'hi', | |
age: new Date() | |
} | |
}; | |
function extend(name, type, obj) { | |
var extension = function() {}; |
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 module(require, func) { | |
for(var i = 0; i < require.length; i++) { | |
require[i] = window[require[i]]; | |
} | |
exports[func].apply(this, require); | |
} |
NewerOlder