{ "manifest": { "name": "tryer", "version": "1.0.1", "description": "Because everyone loves a tryer! Conditional and repeated task invocation for node and browser.", "homepage": "https://gitlab.com/philbooth/tryer", "bugs": { "url": "https://gitlab.com/philbooth/tryer/issues" }, "license": "MIT", "author": { "name": "Phil Booth", "email": "pmbooth@gmail.com", "url": "https://philbooth.me/" }, "main": "./src/tryer", "repository": { "type": "git", "url": "git+https://gitlab.com/philbooth/tryer.git" }, "keywords": [ "repeat", "retry", "predicate", "conditional", "invocation", "execution", "loop", "condition", "termination", "exponential", "backoff" ], "devDependencies": { "chai": "4.1.x", "jshint": "2.9.x", "mocha": "5.2.x", "please-release-me": "2.0.x", "spooks": "2.0.x", "uglify-js": "3.4.x" }, "scripts": { "lint": "jshint src/tryer.js test/unit.js", "test": "mocha --ui tdd --reporter spec --colors test/unit.js", "minify": "uglifyjs ./src/tryer.js --compress --mangle --output ./lib/tryer.min.js" }, "_registry": "npm", "_loc": "/home/josie/.cache/yarn/v6/npm-tryer-1.0.1-integrity/node_modules/tryer/package.json", "contributors": [ { "name": "Phil Booth", "email": "pmbooth@gmail.com", "url": "https://philbooth.me/" }, { "name": "Andrew Lawson", "url": "https://github.com/adlawson" }, { "name": "Tim O'Sulg", "url": "https://github.com/timgluz" } ], "readmeFilename": "README.md", "readme": "# tryer\n\n[![Build status](https://gitlab.com/philbooth/tryer/badges/master/pipeline.svg)](https://gitlab.com/philbooth/tryer/pipelines)\n[![Package status](https://img.shields.io/npm/v/tryer.svg)](https://www.npmjs.com/package/tryer)\n[![Downloads](https://img.shields.io/npm/dm/tryer.svg)](https://www.npmjs.com/package/tryer)\n[![License](https://img.shields.io/npm/l/tryer.svg)](https://opensource.org/licenses/MIT)\n\n\nBecause everyone loves a tryer!\nConditional\nand repeated\nfunction invocation\nfor node\nand browser.\n\n* [Say what?](#say-what)\n* [What size is it?](#what-size-is-it)\n* [How do I install it?](#how-do-i-install-it)\n* [How do I use it?](#how-do-i-use-it)\n * [Loading the library](#loading-the-library)\n * [Calling the exported function](#calling-the-exported-function)\n * [Examples](#examples)\n* [How do I set up the dev environment?](#how-do-i-set-up-the-dev-environment)\n* [What license is it released under?](#what-license-is-it-released-under)\n\n## Say what?\n\nSometimes,\nyou want to defer\ncalling a function\nuntil a certain\npre-requisite condition is met.\nOther times,\nyou want to\ncall a function\nrepeatedly\nuntil some post-requisite condition\nis satisfied.\nOccasionally,\nyou might even want\nto do both\nfor the same function.\n\nTo save you writing\nexplicit conditions\nand loops\non each of those occasions,\n`tryer` implements\na predicate-based approach\nthat hides the cruft\nbehind a simple,\nfunctional interface.\n\nAdditionally,\nit allows you to easily specify\nretry intervals\nand limits,\nso that your code\ndoesn't hog the CPU.\nIt also supports\nexponential backoff\nof retry intervals,\nwhich can be useful\nwhen handling\nindefinite error states\nsuch as network failure.\n\n## What size is it?\n\n5.6 kb unminified with comments, 1.1 kb minified, 0.5 kb minified + gzipped.\n\n## How do I install it?\n\nVia npm:\n\n```\nnpm i tryer --save\n```\n\nOr if you just want the git repo:\n\n```\ngit clone git@gitlab.com:philbooth/tryer.git\n```\n\n## How do I use it?\n\n### Loading the library\n\nIf you are running in\nNode.js\nor another CommonJS-style\nenvironment,\nyou can `require`\ntryer like so:\n\n```javascript\nconst tryer = require('tryer');\n```\n\nIt also the supports\nthe AMD-style format\npreferred by Require.js.\n\nIf you are\nincluding `tryer`\nwith an HTML `