View immutableAggregateReduce.ts
/** | |
* This runs aggregate_reduce through a sequence, in an immutable, repeatable fashion. | |
* | |
* First, elements in the sequence which were not processed, are run through evaluate(). | |
* | |
* Next, elements which still have to be processed, are run through aggregateReduce(). | |
* | |
* Both the aggregate, and the full sequence, are returned after execution. | |
* |
View StreamQueue.js
var StreamQueue = (function () { | |
function StreamQueue() { | |
// The factory | |
this.nextTaskFactory = null; | |
// The current task | |
this.currentTask = null; | |
// Tasks which must have end() called on them. |
View generateTemplateString.js
/** | |
* Produces a function which uses template strings to do simple interpolation from objects. | |
* | |
* Usage: | |
* var makeMeKing = generateTemplateString('${name} is now the king of ${country}!'); | |
* | |
* console.log(makeMeKing({ name: 'Bryan', country: 'Scotland'})); | |
* // Logs 'Bryan is now the king of Scotland!' | |
*/ | |
var generateTemplateString = (function(){ |
View gist:269480242eaf461632a2
/** | |
* Created by bryanerayner on 2014-10-18. | |
*/ | |
///<reference path = "types.d.ts" /> | |
module graphs | |
{ | |
export interface INode<T> | |
{ | |
_getUId:()=>string; // The string |
View jquery.classList.js
/** | |
* jQuery extension, add support `classList`. | |
* | |
* @author RubaXa <trash@rubaxa.org>, bryanerayner <bryan@bryanerayner.ca> | |
* @license MIT | |
*/ | |
(function ($) { | |
var | |
_rspace = /\s+/ |
View SASS Prefix Mixin
/** | |
Prefix - Prefixes a property with webkit, moz, or o. | |
Usage: | |
@include prefix(animation, slide 1s) | |
Outputs: | |
-webkit-animation: slide 1s; | |
-moz-animation: slide 1s; |