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
// by way of http://dmitry.baranovskiy.com/post/typeof-and-friends | |
function is(o, type) { | |
type = String(type).toLowerCase(); | |
return (type == "null" && o === null) || | |
(type == typeof o) || | |
(type == "object" && o === Object(o)) || | |
(type == "array" && Array.isArray && Array.isArray(o)) || | |
Object.prototype.toString.call(o).slice(8, -1).toLowerCase() == type; | |
} |
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
/***** | |
To authorize on Twitter API through xAuth, you need HMAC-SHA1 | |
I'm using the following lib for that: | |
http://jssha.sourceforge.net | |
Make sure you have sha.js included! | |
<script src="http://jssha.sourceforge.net/sha.js"></script> | |
Also, you need to email [email protected] to get xAuth access | |
I cannot do that for you - see http://dev.twitter.com/pages/xauth | |
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
// See comments below. | |
// This code sample and justification brought to you by | |
// Isaac Z. Schlueter, aka isaacs | |
// standard style | |
var a = "ape", | |
b = "bat", | |
c = "cat", | |
d = "dog", |
NewerOlder