Skip to content

Instantly share code, notes, and snippets.

@Raynos
Raynos / 0usage.js
Created December 7, 2011 02:07
The heart of pd
var Parent = {
constructor: function constructor(magic) {
this.isMagic = magic
return this
},
method: function method() { }
}
var Mixin = {
mixinMethod: function () { }
@strathmeyer
strathmeyer / handlebars.object_helpers.js
Created November 16, 2011 21:57
Handlebars.js helpers to iterate over objects
// HELPER: #key_value
//
// Usage: {{#key_value obj}} Key: {{key}} // Value: {{value}} {{/key_value}}
//
// Iterate over an object, setting 'key' and 'value' for each property in
// the object.
Handlebars.registerHelper("key_value", function(obj, fn) {
var buffer = "",
key;