Created
September 25, 2013 10:51
-
-
Save homleen/6697993 to your computer and use it in GitHub Desktop.
underscore init
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'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