{"issue":{"state":"open","created_at":"2011-12-13T22:49:12Z","updated_at":"2011-12-13T23:05:46Z","comments":3,"user":{"gravatar_id":"404c6364f94068264bac04f99f5608a4","id":4117,"url":"https://api.github.com/users/subtleGradient","login":"subtleGradient","avatar_url":"https://secure.gravatar.com/avatar/404c6364f94068264bac04f99f5608a4?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"`spot.fetch()`\r\n\r\n`spot.run()`\r\n\r\n`spot.bury()`\r\n\r\nstuff like that maybe","assignee":null,"id":2545061,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"labels":[],"number":1,"title":"API should be, like, way cuter and stuff","html_url":"https://github.com/bestiejs/spotlight.js/issues/1","closed_at":null,"url":"https://api.github.com/repos/bestiejs/spotlight.js/issues/1","milestone":null},"action":"created","comment":{"created_at":"2011-12-13T23:05:46Z","updated_at":"2011-12-13T23:05:46Z","user":{"gravatar_id":"404c6364f94068264bac04f99f5608a4","id":4117,"url":"https://api.github.com/users/subtleGradient","login":"subtleGradient","avatar_url":"https://secure.gravatar.com/avatar/404c6364f94068264bac04f99f5608a4?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"```javascript\r\n\r\nyard = require('some-crazy-deeply-nested-object-structure-or-something')\r\nspot = require('spotlight')\r\n\r\nvar isBall = function(object){\r\n    if (!object) return false\r\n    if (typeof object != 'object') return false\r\n    return !!object.isBall\r\n}\r\n\r\n// Hey spot, fetch all the balls in the yard.\r\nfetchAllTheBalls = spot.fetch(yard, isBall, function(ball){ console.log(ball) })\r\n\r\nfetchAllTheBalls() // Hey spot, do that again.\r\n\r\nfetchAllTheBalls(function(ball){ ball.style.color = 'blue' }) // Hey spot, paint them all blue!\r\n```\r\n","id":3132379,"url":"https://api.github.com/repos/bestiejs/spotlight.js/issues/comments/3132379"}}