Skip to content

Instantly share code, notes, and snippets.

@kevinconway
kevinconway / Universal JavaScript Modules.rst
Last active March 10, 2019 03:45 — forked from millermedeiros/universal-module.js
Universal JavaScript Module that supports AMD (RequireJS), Node.js, and the browser.
@kevinconway
kevinconway / gist:2725683
Created May 18, 2012 14:54
Property decorator example for SuperToDo
class ToDo(object):
"""base ToDo class - simple datastructure for defining a ToDo Item"""
def __init__(self, description, location = None):
super(ToDo, self).__init__()
self._description = description
self._isThisDone = False
self._location = location
@property
def description():
@kevinconway
kevinconway / universal.js
Created May 15, 2012 02:26 — forked from thomasdavis/universal-module.js
Universal JavaScript Module.
(function (name, definition) {
"use strict";
// Call the definition in the current context so that it can access the
// global object in case of a browser environment.
var the_module = definition.call(this),
has_exports = typeof module !== 'undefined' && module.exports,
obj,
namespaces,
scope,
i,