{
  "name": "tryor",
  "version": "0.1.2",
  "description": "return fn() or default value (in case of exception)",
  "main": "tryor.js",
  "repository": {
    "type": "git",
    "url": "https://github.com/olov/tryor.git"
  },
  "keywords": [
    "try",
    "catch",
    "default"
  ],
  "author": {
    "name": "Olov Lassus",
    "email": "olov.lassus@gmail.com"
  },
  "license": "MIT",
  "readme": "# tryor.js\nGive it a function and a default value. `tryor` will give you back the return value of\nthe function or, in case the function threw an exception, the default value.\nWorks in node and browsers.\n\n\n\n## Usage\n```javascript\n    // do this\n    var config = tryor(function() {\n        return JSON.parse(userProvidedConfigString);\n    }, {});\n\n    // instead of\n    var config; // or var config = {}; and empty catch\n    try {\n        config = JSON.parse(userProvidedConfigString);\n    } catch (e) {\n        config = {};\n    }\n```\n\nWorks extra well with ES6-style `const` variables.\n\n\n\n## Installation\n\n### Node\nInstall using npm\n\n    npm install tryor\n\n```javascript\nvar tryor = require(\"tryor\");\n```\n\n### Browser\nClone the repo and include it in a script tag\n\n    git clone https://github.com/olov/tryor.git\n\n```html\n<script src=\"tryor/tryor.js\"></script>\n```\n",
  "readmeFilename": "README.md",
  "_id": "tryor@0.1.2",
  "dist": {
    "shasum": "8145e4ca7caff40acde3ccf946e8b8bb75b4172b",
    "tarball": "https://registry.npmjs.org/tryor/-/tryor-0.1.2.tgz"
  },
  "_resolved": "https://registry.npmjs.org/tryor/-/tryor-0.1.2.tgz",
  "_from": "tryor@>=0.1.2 <0.2.0",
  "scripts": {},
  "_npmVersion": "1.2.18",
  "_npmUser": {
    "name": "olov",
    "email": "olov.lassus@gmail.com"
  },
  "maintainers": [
    {
      "name": "olov",
      "email": "olov.lassus@gmail.com"
    }
  ],
  "directories": {},
  "_shasum": "8145e4ca7caff40acde3ccf946e8b8bb75b4172b"
}
