Skip to content

Instantly share code, notes, and snippets.

@verma
Created October 17, 2014 19:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save verma/5d40b57a8383e5f1a940 to your computer and use it in GitHub Desktop.
Save verma/5d40b57a8383e5f1a940 to your computer and use it in GitHub Desktop.
GreyhoundReader.prototype.readIndexed = function(sessionId, bbox, schema, depthBegin, depthEnd, cb) {
var options = {
schema: (schema || Schema.standard()),
};
if (typeof(bbox) === 'function') {
cb = bbox;
bbox = schema = depthBegin = depthEnd = null;
}
if (typeof(schema) === 'function') {
cb = schema;
schema = depthBegin = depthEnd = null;
}
if (typeof(depthBegin) === 'function') {
cb = depthBegin;
depthBegin = depthEnd = null;
}
if (typeof(depthEnd) === 'function') {
cb = depthEnd;
depthEnd = null;
}
// ...
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment