[
  {
    "path": ".gitignore",
    "content": "*.png\n"
  },
  {
    "path": "README.md",
    "content": "# SmartDebug.JS\nNext-generation debugging for javascript!\n\n## Inspired by\n\nSadly, I do not know original author of image - but I would be more than glad to credit him for this awesome idea.\n\n![Inspiration](https://github.com/MRokas/SmartDebug.JS/blob/master/Inspiration.jpg?raw=true)\n\n## Getting started\n\nFirst clone git:\n\n```git clone http://github.com/MRokas/SmartDebug.JS.git```\n\nAnd then include it by using your preferred method:\n\n```<script src=\"js/smartdebug.js\"></script> ```\n\n```import SmartDebug from \"js/smartdebug\"; ```\n\n```SmartDebug = require(\"js/smartdebug\"); ```\n\n## Usage\n\nBasic usage using default settings:\n\n    SmartDebug(function() { console.log(a); });\n    // redirects to http://stackoverflow.com/search?q=[js] + a is not defined\n\nBasic usage with redirecting to stackoverflow:\n\n    SmartDebug({\n        run: function() { console.log(a); }\n    });\n    // redirects to http://stackoverflow.com/search?q=[js] + a is not defined\n\nIf you prefer to use callback function, provide function or use ```true``` to use default function\n\n    SmartDebug({\n        run: function() { console.log(a); },\n        callback: true\n    });\n    // Console output: http://stackoverflow.com/search?q=[js] + a is not defined\n\nUsing your own callback functions is just as simple:\n\n    var errors = [];\n\n    SmartDebug({\n        run: function() { console.log(a); },\n        callback: function (arg1) { errors.push(arg1); }\n    });\n\n    console.log(errors);\n    // Console output: Array [ \"http://stackoverflow.com/search?q=[js] + a is not defined\" ]\n\nIf you prefer to always use same callback function, just set default one:\n\n    var errors = [];\n    SmartDebug.callback = function (arg1) { errors.push(arg1); };\n    SmartDebug({\n        run: function() { console.log(a); }\n    });\n\n    console.log(errors);\n    // Console output: Array [ \"http://stackoverflow.com/search?q=[js] + a is not defined\" ]\n\nAnd if stackoverflow isn't your prefered site to search for errors, provide it:\n\n    SmartDebug({\n        run: function() { console.log(a); },\n        link: \"https://www.google.com/search?q=javascript \"\n    });\n    // redirects to https://www.google.com/search?q=javascript a is not defined\n\nOr you can provide default one:\n\n    var errors = [];\n\n    SmartDebug.link = \"https://www.google.com/search?q=javascript \";\n    SmartDebug({\n        run: function() { console.log(a); },\n        callback: function (arg1) { errors.push(arg1); }\n    });\n\n    console.log(errors);\n    // Console output: Array [ \"https://www.google.com/search?q=javascript a is not defined\" ]\n\n## TODO\n\n_Nothing - post issue or send PR!_\n\n## DISCLAIMER\n\nThis is just a satire, enjoy.\n"
  },
  {
    "path": "smartdebug.js",
    "content": "// No Copyright 2016 https://github.com/MRokas\n// Inspired by this imgur picture - http://i.imgur.com/3XvPstB.jpg\n// Author unknown, I would be more than glad to credit him.\n(function(name, definition) {\n    if (typeof module != 'undefined') module.exports = definition();\n    else if (typeof define == 'function' && typeof define.amd == 'object') define(definition);\n    else this[name] = definition();\n}('SmartDebug', function() {\n    function SmartDebug(arg1) {\n        var _run = typeof arg1 === 'object' && typeof arg1.run !== 'undefined' ? arg1.run : typeof arg1 === 'function' ? arg1 : undefined ;\n        var _cb = typeof arg1 === 'object' && typeof arg1.callback !== 'undefined' ? arg1.callback : SmartDebug.callback;\n        var _link = typeof arg1 === 'object' && typeof arg1.link !== 'undefined' ? arg1.link : SmartDebug.link;\n        _cb = typeof _cb === 'boolean'\n            ? _cb\n                ? (SmartDebug.callback !== false ? SmartDebug.callback : console.log.bind(console))\n                : false\n            : typeof _cb === 'function'\n                ? _cb\n                : false;\n        \ttry {\n        \t\t_run();\n        \t} catch(ex) {\n        \t\t_link += ex.message;\n        \t\t!_cb ? (window.location.href = _link) : (_cb(_link));\n        \t}\n    }\n    SmartDebug.callback = false;\n    SmartDebug.link = \"http://stackoverflow.com/search?q=[js] + \";\n    return SmartDebug;\n}));\n"
  }
]