Skip to content

Instantly share code, notes, and snippets.

View themattharris's full-sized avatar

Matt Harris themattharris

View GitHub Profile
@bcherry
bcherry / snowflakeadapter.js
Created October 21, 2010 00:16
adaptive function for the new string IDs for Twitter API objects (Snowflake)
// adaptive function for the new string IDs for Twitter API objects (Snowflake)
function useStringIdentifier(obj, property) {
var property_str = property + "_str";
if (!obj) {
return;
}
if (obj[property_str]) {
obj[property] = obj[property_str].toString();
delete obj[property_str];
/*
natcompare.js -- Perform 'natural order' comparisons of strings in JavaScript.
Copyright (C) 2005 by SCK-CEN (Belgian Nucleair Research Centre)
Written by Kristof Coomans <kristof[dot]coomans[at]sckcen[dot]be>
Based on the Java version by Pierre-Luc Paour, of which this is more or less a straight conversion.
Copyright (C) 2003 by Pierre-Luc Paour <natorder@paour.com>
The Java version was based on the C version by Martin Pool.
Copyright (C) 2000 by Martin Pool <mbp@humbug.org.au>