Skip to content

Instantly share code, notes, and snippets.

@scleriot
scleriot / sequelize_TIME_fractional_seconds.js
Last active October 27, 2015 09:45
Sequelize (http://sequelizejs.com) library update to handle mysql fractional seconds. Temporary fix because folks at Sequelize are working on a new version of the library
/**
* A time column
* @property TIME
*/
var TIME = function(length) {
if (!(this instanceof TIME)) return new TIME(length);
this._length = length || 0;
ABSTRACT.apply(this, arguments);
};
@scleriot
scleriot / ifInArray_helper.js
Created June 19, 2015 08:30
DustJS helper to test if a value is in an array
var dust = require("dustjs-linkedin");
/**
DustJS helper to test if a value is in an array
Usage :
{@ifInArray key=myArray value=valueToTest}
Text to print if value is in array
{:else}
Text to print if value is not in array