- all
hodor
belong the thehodor
scope - everything is a
hodor
hodor
are first-class citizens
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
var glurnt = require("gulp") | |
, uglify = require("gulp-uglify") | |
glurnt.task("k", function(){ | |
return glurnt.src("foo/**") | |
.pipe(uglify()) | |
.pipe(glurnt.dest("dist/foo")) | |
}) |
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
var splice = [].splice | |
, baseClass = { | |
create : function(){ | |
return Object.create(this) | |
}, | |
method : function(name, fn){ | |
Object.defineProperty(this, name, { | |
writable : true, | |
configurable : true, | |
enumerable : false, |
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
module.exports = require("bloody-events").create() |
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 toUnicode(string) { | |
var index = -1 | |
var length = string.length | |
var chars = [] | |
var item | |
while(++index < length) { | |
item = string.charCodeAt(index).toString(16).toUpperCase() | |
item = "\\u" + Array(5 - item.length).join("0") + item | |
chars.push(item) | |
} |
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
var stream = require("bloody-stream") | |
var concat = require("bloody-stream/lib/concat") | |
var escapeRE = /([.*+?^=!:$(){}|[\]\/\\])/g | |
var mapEscape = function(string){ | |
return string.replace(escapeRE, "\\$1") | |
} | |
var tilde = function(words){ | |
var wordsRE = RegExp("\\b" + words.map(mapEscape).join("\\b|\\b") + "\\b", "g") | |
return stream.create(function(chunk){ | |
if(!wordsRE.test(chunk)) { |
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
var promise = require("bloody-promise") | |
var log = function(string){ | |
document.body.appendChild(document.createTextNode(string)) | |
document.body.appendChild(document.createElement("br")) | |
} | |
var mapAsync = function(array, fn){ | |
var index = -1 | |
var length = array.length | |
var promises = [] |
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
var klass = require("bloody-class") | |
var myClass = klass.extend({ | |
get : function(){ | |
return "deep" | |
} | |
}) | |
.extend({ | |
get : function(){ | |
return "shallow" |
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
var nativeSlice = Array.prototype.slice | |
var CAN_SLICE_NODELISTS = function(){ | |
try { | |
nativeSlice.call(document.documentElement.children) | |
return true | |
} catch(e){ | |
return false | |
} | |
}() | |
var ACCEPTED_NODETYPES = { |