Skip to content

Instantly share code, notes, and snippets.

View groner's full-sized avatar

Kai Groner groner

  • Charlottesville, VA
View GitHub Profile
@levjj
levjj / sweet-units.sjs
Last active August 29, 2015 13:56
Units of measure with sweet.js
// Some minimal class for values with units
// (nothing exciting going on...)
function Unit(name,val) {
this.name = name;
this.val = val;
}
Unit.prototype.toString = function() {
return this.val + " " + this.name;
}