Skip to content

Instantly share code, notes, and snippets.

@homleen
Created September 25, 2013 10:51
Show Gist options
  • Save homleen/6697993 to your computer and use it in GitHub Desktop.
Save homleen/6697993 to your computer and use it in GitHub Desktop.
underscore init
'use strict';
var _ = function(obj) {
console.log('heading');
if (obj instanceof _) return obj;
console.log('body');
if (!(this instanceof _)) return new _(obj);
console.log('ending');
};
var underscore = _([]);
console.log('-------------------');
_(underscore);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment