{"_id":"@danilo.sanchi/timeseries","_rev":"4-764e9ef47ab75011784907c5a1579d71","name":"@danilo.sanchi/timeseries","dist-tags":{"latest":"0.0.3"},"versions":{"0.0.1":{"name":"@danilo.sanchi/timeseries","version":"0.0.1","description":"","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/danielsan80/avanscoperta_timeseries.git"},"author":{"name":"Danilo Sanchi, Tommaso Allevi"},"license":"UNLICENCED","bugs":{"url":"https://github.com/danielsan80/avanscoperta_timeseries/issues"},"homepage":"https://github.com/danielsan80/avanscoperta_timeseries#readme","dependencies":{"mongodb":"^2.2.22","pino":"^3.4.0"},"devDependencies":{"mocha":"^3.2.0"},"gitHead":"3e553036e3f12c15ad286829e5798370761a0f5d","_id":"@danilo.sanchi/timeseries@0.0.1","_shasum":"af48cacba16cae78936c5021732fdf6b311a5d09","_from":".","_npmVersion":"3.5.2","_nodeVersion":"4.4.7","_npmUser":{"name":"danilo.sanchi","email":"danilo.sanchi@gmail.com"},"dist":{"shasum":"af48cacba16cae78936c5021732fdf6b311a5d09","tarball":"https://registry.npmjs.org/@danilo.sanchi/timeseries/-/timeseries-0.0.1.tgz","integrity":"sha512-LTUVhtWSPBmXtNNe+ZfKkFoNsD9+mTMwUIKlP0AIms6tGmsHtPl/ai0BWfYmTaouFTwXwBiIqF3hzcvww2KcgQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDEUEGkZx+QOwowfPT9vLT4DtHpElO3x5/8LGxlRKxmswIgTU64hH8Y9oCwD9qQWXNAjnD9I7KfuV8VIq/19wpFr00="}]},"maintainers":[{"name":"danilo.sanchi","email":"danilo.sanchi@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/timeseries-0.0.1.tgz_1486647700105_0.3104941917117685"}},"0.0.2":{"name":"@danilo.sanchi/timeseries","version":"0.0.2","description":"Time Series ===========","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/danielsan80/avanscoperta_timeseries.git"},"author":{"name":"Danilo Sanchi, Tommaso Allevi"},"license":"UNLICENCED","bugs":{"url":"https://github.com/danielsan80/avanscoperta_timeseries/issues"},"homepage":"https://github.com/danielsan80/avanscoperta_timeseries#readme","peerDependencies":{"mongodb":"^2.2.22","pino":"^3.4.0"},"devDependencies":{"mocha":"^3.2.0"},"gitHead":"140e426bfd8b2e13f5d79a0f049e7d7f9a9baacf","_id":"@danilo.sanchi/timeseries@0.0.2","_shasum":"464b9bb303e826baa940269662f63db9f854e1b1","_from":".","_npmVersion":"3.5.2","_nodeVersion":"4.4.7","_npmUser":{"name":"danilo.sanchi","email":"danilo.sanchi@gmail.com"},"dist":{"shasum":"464b9bb303e826baa940269662f63db9f854e1b1","tarball":"https://registry.npmjs.org/@danilo.sanchi/timeseries/-/timeseries-0.0.2.tgz","integrity":"sha512-jVtMc05InQXKy8HVCfEjvW7A9FLbtTmhc6Hh7WlnbOJPeG1vQgP5JxqAk26f7LdJoDQ+wgGt/jbW0bHwcbYo+Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFjFeJ5W+qEjp6yMIs1GbsnfuJ8AYeyeNPVGm7Avb9WdAiEAmUhvfkcP1MGiAyabVak4KatjfMdZDLjpQ8IyUdvDlI4="}]},"maintainers":[{"name":"danilo.sanchi","email":"danilo.sanchi@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/timeseries-0.0.2.tgz_1486648415592_0.18211351078934968"}},"0.0.3":{"name":"@danilo.sanchi/timeseries","version":"0.0.3","description":"","main":"index.js","scripts":{"test":"npm run lint && npm run tap","tap":"tap test/**/*.js","lint":"standard"},"repository":{"type":"git","url":"git+https://github.com/danielsan80/avanscoperta_timeseries.git"},"author":{"name":"Danilo Sanchi, Tommaso Allevi"},"license":"UNLICENCED","bugs":{"url":"https://github.com/danielsan80/avanscoperta_timeseries/issues"},"homepage":"https://github.com/danielsan80/avanscoperta_timeseries#readme","peerDependencies":{"mongodb":"^2.2.22","pino":"^3.4.0"},"devDependencies":{"async":"^2.1.4","moment":"^2.17.1","standard":"^9.0.0-beta.0","tap":"^10.1.0"},"gitHead":"3f87222db5ea8562575051ef7aaf8ae85022dd39","_id":"@danilo.sanchi/timeseries@0.0.3","_shasum":"98f4b7c51b615d8a712f13dc4d9615805e9ee838","_from":".","_npmVersion":"3.5.2","_nodeVersion":"4.4.7","_npmUser":{"name":"danilo.sanchi","email":"danilo.sanchi@gmail.com"},"dist":{"shasum":"98f4b7c51b615d8a712f13dc4d9615805e9ee838","tarball":"https://registry.npmjs.org/@danilo.sanchi/timeseries/-/timeseries-0.0.3.tgz","integrity":"sha512-O2+MNB2DR/y0p74r7lZ5qndP4k7E/WTtMudnaZhkJLofrQk0XrdQNl+VPj/YIHB+jptVf98oofYCr2G3/U/o1g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCBpmxTyHPyJYsaHI+Uwzbr4z1yff8jIjujMHfS3bUWJgIhAIS18BwROlDvC7icbi3Na8oy08wunRwtKrlnmFFtQDhV"}]},"maintainers":[{"name":"danilo.sanchi","email":"danilo.sanchi@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/timeseries-0.0.3.tgz_1486723691101_0.6015699994750321"}}},"readme":"# Time Series\n\n\n  * <a href=\"#basic\">Basic Usage</a>\n  * <a href=\"#api\">API</a>\n\n<a name=\"basic\"></a>\nBasic usage\n-----------\n\n```js\nvar timeseries = require('timeseries')\n\nvar timeserie = timeseries(mongodbConn, pino);\n\n// 2) put a key & value\ntimeserie.addPoint(new Date(), 'smog', 45, callback);\n\ntimeserie.addPoint(new Date(), 'smog', 45, callback);\n\nvar stream = timeserie.fetchSerie('smog', {\n  from: aWeekAgo,\n  to: new Date(),\n});\n\n...\n\n```\n\n<a name=\"api\"></a>\n## API\n\n  * <a href=\"#creator\"><code><b>timeseries(mongodbConn, logger)</b></code></a>\n  * <a href=\"#addPoint\"><code>timeserie.<b>addPoint(date, type, value, callback)</b></code></a>\n  * <a href=\"#fetchSerie\"><code>timeserie.<b>fetchSerie(type, query = {})</b></code></a>\n\n--------------------------------------------------------\n<a name=\"creator\"></a>\n### timeseries(mongodbConn, logger)\n<code>timeseries()</code> is the main entry point for creating a new timeserie instance.\n\n\n--------------------------------------------------------\n<a name=\"addPoint\"></a>\n### timeserie.addPoint(date, type, value, callback)\n<code>timeserie.addPoint()</code> method will add a new point for a specified `type` at the specified `date`. `value` should be a number.\n\n```js\ntimeserie.addPoint(new Date(), 'smog', 42, function (err) {\n  if (err) throw err\n})\n```\n\n--------------------------------------------------------\n<a name=\"fetchSerie\"></a>\n### timeserie.fetchSerie(type, query)\n<code>timeserie.fetchSerie()</code> method will fetch the point collection for a given `type` matching a given `query`.\nThis will return a stream of points.\n\n```js\nvar stream = timeserie.fetchSerie('smog', {\n  from: aWeekAgoDate,\n  to: new Date()\n})\n```\n#### `Query`\n\n* `from` the lower bound date interval.\n* `to` the upper bound date interval\n","maintainers":[{"name":"danilo.sanchi","email":"danilo.sanchi@gmail.com"}],"time":{"modified":"2022-06-12T16:52:04.419Z","created":"2017-02-09T13:41:41.835Z","0.0.1":"2017-02-09T13:41:41.835Z","0.0.2":"2017-02-09T13:53:37.471Z","0.0.3":"2017-02-10T10:48:12.953Z"},"homepage":"https://github.com/danielsan80/avanscoperta_timeseries#readme","repository":{"type":"git","url":"git+https://github.com/danielsan80/avanscoperta_timeseries.git"},"author":{"name":"Danilo Sanchi, Tommaso Allevi"},"bugs":{"url":"https://github.com/danielsan80/avanscoperta_timeseries/issues"},"license":"UNLICENCED","readmeFilename":"README.md"}