{"_id":"tx2","_rev":"2770983","name":"tx2","description":"Metrics, Issues, Actions, Events reporting library","dist-tags":{"latest":"1.0.5"},"maintainers":[{"name":"tknew","email":"strzelewicz.alexandre@gmail.com"}],"time":{"modified":"2022-05-23T09:39:15.000Z","created":"2021-01-18T21:29:20.097Z","1.0.5":"2021-11-21T16:17:41.380Z","1.0.4":"2021-02-02T20:46:37.693Z","1.0.3":"2021-01-18T21:29:20.097Z"},"users":{},"author":{"name":"PM2"},"versions":{"1.0.5":{"name":"tx2","version":"1.0.5","description":"Metrics, Issues, Actions, Events reporting library","main":"index.js","scripts":{"test":"mocha test/*.mocha.js","doc":"npx jsdoc2md src/* > API.md"},"author":{"name":"PM2"},"license":"MIT","dependencies":{"json-stringify-safe":"^5.0.1"},"devDependencies":{"jsdoc-to-markdown":"^6.0.1","mocha":"8","should":"13"},"gitHead":"e0744395d4c9d10e55018eb36757ba5a6a1b8307","_id":"tx2@1.0.5","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"shasum":"ee0b0e5e2c351f8d23e54bdf46dd60afa3bbc73d","size":9955,"noattachment":false,"key":"/tx2/-/tx2-1.0.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/tx2/download/tx2-1.0.5.tgz"},"_npmUser":{"name":"tknew","email":"strzelewicz.alexandre@gmail.com"},"directories":{},"maintainers":[{"name":"tknew","email":"strzelewicz.alexandre@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tx2_1.0.5_1637511461220_0.18155790670579486"},"_hasShrinkwrap":false,"publish_time":1637511461380,"_cnpm_publish_time":1637511461380,"_cnpmcore_publish_time":"2021-12-17T01:06:37.051Z"},"1.0.4":{"name":"tx2","version":"1.0.4","description":"Metrics, Issues, Actions, Events reporting library","main":"index.js","scripts":{"test":"mocha test/*.mocha.js","doc":"npx jsdoc2md src/* > API.md"},"author":{"name":"PM2"},"license":"MIT","dependencies":{"json-stringify-safe":"^5.0.1"},"devDependencies":{"jsdoc-to-markdown":"^6.0.1","mocha":"8","should":"13"},"gitHead":"be5f687dd991f304873d5278bbcf32e027d78cab","_id":"tx2@1.0.4","_nodeVersion":"15.4.0","_npmVersion":"7.0.15","dist":{"shasum":"cb9432df22e0b8c54daf711b51b708f094449ddf","size":9713,"noattachment":false,"key":"/tx2/-/tx2-1.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/tx2/download/tx2-1.0.4.tgz"},"_npmUser":{"name":"tknew","email":"strzelewicz.alexandre@gmail.com"},"directories":{},"maintainers":[{"name":"tknew","email":"strzelewicz.alexandre@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tx2_1.0.4_1612298797528_0.2623750309892068"},"_hasShrinkwrap":false,"publish_time":1612298797693,"_cnpm_publish_time":1612298797693,"_cnpmcore_publish_time":"2021-12-17T01:06:37.280Z"},"1.0.3":{"name":"tx2","version":"1.0.3","description":"Report Events, Metrics, Issues, Actions to PM2 and PM2.io.","main":"index.js","scripts":{"test":"mocha test/*.mocha.js"},"author":{"name":"PM2"},"license":"MIT","dependencies":{"json-stringify-safe":"^5.0.1"},"devDependencies":{"mocha":"8","should":"13"},"gitHead":"bd9f28f851f4fe86ad124effb53fa739237bb808","_id":"tx2@1.0.3","_nodeVersion":"15.4.0","_npmVersion":"7.0.15","dist":{"shasum":"bb4eb6b3ac649b328a8b4ad9f6d951effa4ebc5a","size":8151,"noattachment":false,"key":"/tx2/-/tx2-1.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/tx2/download/tx2-1.0.3.tgz"},"_npmUser":{"name":"tknew","email":"strzelewicz.alexandre@gmail.com"},"directories":{},"maintainers":[{"name":"tknew","email":"strzelewicz.alexandre@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tx2_1.0.3_1611005359844_0.23436750774454462"},"_hasShrinkwrap":false,"publish_time":1611005360097,"_cnpm_publish_time":1611005360097,"_cnpmcore_publish_time":"2021-12-17T01:06:37.474Z"}},"readme":"\n## tx2\n\nReport Events, Metrics, Issues, Actions to PM2 and PM2.io.\n\n```javascript\nconst tx2 = require('tx2')\n\nlet body = { calories : 20 }\ntx2.metric('burnt calories', () => body.calories)\n\ntx2.action('lift weights', (cb) => {\n  cb({ success: true })\n})\n```\n\nCheck [API.md](API.md) for full API doc.\n\nOnce you have created some metrics:\n\n```bash\n$ pm2 start app.js\n```\n\nThen run:\n\n```bash\n# Inspect primitive reported\n$ pm2 show app\n```\n\nor go to pm2.io for web based interface + insights creation.\n\n## More\n\nGenerate documentation:\n\n```bash\n$ npm run doc\n```\n\n## License\n\nMIT\n","_attachments":{},"license":"MIT"}