html5 boiler plate
[scannr.git] / js / flotr2 / examples / js / ExampleList.js
blob:a/js/flotr2/examples/js/ExampleList.js -> blob:b/js/flotr2/examples/js/ExampleList.js
  (function () {
   
  var ExampleList = function () {
   
  // Map of examples.
  this.examples = {};
   
  };
   
  ExampleList.prototype = {
   
  add : function (example) {
  this.examples[example.key] = example;
  },
   
  get : function (key) {
  return key ? (this.examples[key] || null) : this.examples;
  },
   
  getType : function (type) {
  return Flotr._.select(this.examples, function (example) {
  return (example.type === type);
  });
  }
  }
   
  Flotr.ExampleList = new ExampleList();
   
  })();