{"action":"created","issue":{"url":"https://api.github.com/repos/whitlockjc/json-refs/issues/6","labels_url":"https://api.github.com/repos/whitlockjc/json-refs/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/whitlockjc/json-refs/issues/6/comments","events_url":"https://api.github.com/repos/whitlockjc/json-refs/issues/6/events","html_url":"https://github.com/whitlockjc/json-refs/issues/6","id":56921815,"number":6,"title":"Example usage fails","user":{"login":"schrag","id":4502215,"avatar_url":"https://avatars.githubusercontent.com/u/4502215?v=3","gravatar_id":"","url":"https://api.github.com/users/schrag","html_url":"https://github.com/schrag","followers_url":"https://api.github.com/users/schrag/followers","following_url":"https://api.github.com/users/schrag/following{/other_user}","gists_url":"https://api.github.com/users/schrag/gists{/gist_id}","starred_url":"https://api.github.com/users/schrag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schrag/subscriptions","organizations_url":"https://api.github.com/users/schrag/orgs","repos_url":"https://api.github.com/users/schrag/repos","events_url":"https://api.github.com/users/schrag/events{/privacy}","received_events_url":"https://api.github.com/users/schrag/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-02-07T19:06:50Z","updated_at":"2015-02-07T21:58:07Z","closed_at":"2015-02-07T21:05:09Z","body":"Trying to execute the example at https://www.npmjs.com/package/json-refs, getting failure: \"Uncaught ReferenceError: refs is not defined\" at line 21 of source file contents below.  (Please advise if there is a better place to submit such a report.  Thanks.)\r\n\r\n<!DOCTYPE html>\r\n<html>\r\n<body>\r\n<p> Trying to run schema de-referencing. </p>\r\n\r\n<script type=\"text/javascript\" src=\"bower_components/json-refs/browser/json-refs.js\"> </script>\r\n\r\n<script>\r\n\r\nvar json = {\r\n  name: 'json-refs',\r\n  owner: {\r\n    $ref: 'https://api.github.com/repos/whitlockjc/json-refs#/owner'\r\n  }\r\n};\r\n\r\njson-refs-standalone.resolveRefs(json, function (err, rJson) {\r\n  if (err) throw err;\r\n \r\n  console.log(JSON.stringify(rJson)); // {name: 'json-refs', owner: {/* GitHub Repository Owner Information */}} \r\n});\r\n\r\n</script>\r\n\r\n</body>\r\n</html>\r\n"},"comment":{"url":"https://api.github.com/repos/whitlockjc/json-refs/issues/comments/73385171","html_url":"https://github.com/whitlockjc/json-refs/issues/6#issuecomment-73385171","issue_url":"https://api.github.com/repos/whitlockjc/json-refs/issues/6","id":73385171,"user":{"login":"whitlockjc","id":98899,"avatar_url":"https://avatars.githubusercontent.com/u/98899?v=3","gravatar_id":"","url":"https://api.github.com/users/whitlockjc","html_url":"https://github.com/whitlockjc","followers_url":"https://api.github.com/users/whitlockjc/followers","following_url":"https://api.github.com/users/whitlockjc/following{/other_user}","gists_url":"https://api.github.com/users/whitlockjc/gists{/gist_id}","starred_url":"https://api.github.com/users/whitlockjc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whitlockjc/subscriptions","organizations_url":"https://api.github.com/users/whitlockjc/orgs","repos_url":"https://api.github.com/users/whitlockjc/repos","events_url":"https://api.github.com/users/whitlockjc/events{/privacy}","received_events_url":"https://api.github.com/users/whitlockjc/received_events","type":"User","site_admin":false},"created_at":"2015-02-07T21:58:07Z","updated_at":"2015-02-07T21:58:07Z","body":"Ah...you're using `json-refs-standalone` but the exported browser name is `JsonRefs`.  That part was right in the [README](https://github.com/whitlockjc/json-refs#apis).  So replace `json-refs-standalone.resolveRefs` with `JsonRefs.resolveRefs` and let me know"}}