This file contains 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() { | |
var lazyLoadScript = function(url) { | |
// make sure the script being loaded does not do document.write and can be deferred. | |
var ns = document.createElement('script'), | |
s = document.getElementsByTagName('script')[0]; | |
ns.type = 'text/javascript'; | |
ns.async = true; | |
ns.src = url; | |
s.parentNode.insertBefore(ns, s); |
This file contains 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
require.config({ | |
baseUrl: 'scripts/', | |
paths: { | |
'text': 'lib/text', | |
'mustache': 'lib/mustache', | |
'mootools': 'lib/mootools-core', | |
'mootools-more': 'lib/mootools-more', | |
'router': 'lib/router', | |
'breadcrumb': 'modules/breadcrumb', | |
'settings': 'modules/settings', |
This file contains 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($) { | |
"use strict"; // jshint ;_; | |
/* DROPDOWN CLASS DEFINITION | |
* ========================= */ | |
var toggle = '[data-toggle="dropdown"]', | |
Dropdown = function (element) { | |
var $el = $(element).on('click.dropdown.data-api', this.toggle); |
This file contains 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(){ | |
/* | |
--- | |
description: DynamicTextarea | |
license: MIT-style | |
authors: | |
- Amadeus Demarzi (http://amadeusamade.us) |
This file contains 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
buster.testCase('breaking call stack when using circular references and spies', { | |
setUp: function() { | |
var A = function() { | |
this.collections = []; | |
}, B = function() { | |
this.models = []; | |
this.add = function(what) { | |
what.collections.push(this); |
This file contains 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
$.if = function(){ | |
var truthy = 1; | |
for (var i = 0; i < arguments.length; i++){ | |
if (!arguments[i]){ | |
truthy = 0; | |
break; | |
} | |
} |
This file contains 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
<?php | |
/** | |
* proxy for getting json data via CURL | |
*/ | |
header('Cache-Control: no-cache, must-revalidate'); | |
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); | |
header('Content-type: application/json'); | |
$url = $_REQUEST['url']; |
This file contains 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
> npm test | |
> [email protected] test /Users/dchristoff/projects/Epitome | |
> node_modules/.bin/buster-test | |
Firefox 13.0.1, OS X 10.7 (Lion): ................................................................................ | |
... | |
9 test cases, 83 tests, 83 assertions, 0 failures, 0 errors, 0 timeouts | |
Finished in 0.852s |
This file contains 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 Epitome = {}; | |
typeof define == "function" && define.amd ? define("epitome", [], function() { | |
return Epitome | |
}) : typeof module == "object" ? module.exports = Epitome : exports.Epitome = Epitome | |
})(this), function(exports) { | |
var Epitome = typeof require == "function" ? require("./epitome") : exports.Epitome, | |
eq = Epitome.isEqual = function(a, b, stack) { | |
stack = stack || []; | |
if (a === b) return a !== 0 || 1 / a == 1 / b; |