{"_id":"hatchet.io","_rev":"53-778538207e95cd04254befeffda30eaf","name":"hatchet.io","description":"Hosted socket.io service with a simple API for sending and receiving messages.","dist-tags":{"latest":"0.0.6"},"versions":{"0.0.0":{"name":"hatchet.io","version":"0.0.0","description":"Hosted socket.io service with a simple API for sending and receiving messages.","homepage":"https://github.com/benjaminpearson/hatchet.io-node","author":{"name":"Ben Pearson","url":"http://hatchet.io"},"bugs":{"url":"https://github.com/benjaminpearson/hatchet.io-node/issues"},"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git://github.com/benjaminpearson/hatchet.io-node.git"},"engines":{"node":">= 0.6.0"},"licenses":[{"type":"MIT","url":"https://github.com/benjaminpearson/hatchet.io-node/blob/master/LICENSE-MIT"}],"dependencies":{"socket.io-client":"~0.9.11"},"readme":"# hatchet.io\n\nHosted (or self-hosted) socket.io service with a simple API for sending and receiving messages. It can be used for logging, analytics or any simple message broadcasting for your app.\n\n## Getting Started\n\nInstall the module with: `npm install hatchet.io`\n\n## Documentation\n\n_(Coming soon)_\n\n## Examples\n\n### Receiving Messages\n\n```javascript\nvar hatchet = require('hatchet.io');\n\nhatchet.authenticate('http://douglas.hatchet.io:1337', 'demo', 'iYkrswPZVIrUMv');\n\n// Watch for 'log' events and run the defined function when it occurs\nhatchet.watch('log', function(data) {\n\tconsole.log('log', data);\n});\n\n// Watch another\nhatchet.watch('signup', function(data) {\n\tconsole.log('signup', data);\n});\n\n// You can also stop listening to an event\nsetTimeout(function() {\n\thatchet.unwatch('log');\n}, 20000);\n```\n\n### Sending Messages\n\n```javascript\nvar hatchet = require('hatchet.io');\n\nhatchet.authenticate('http://douglas.hatchet.io:1338', 'demo', 'iYkrswPZVIrUMv');\n\n// Warmup begins connection + auth process to server, otherwise it happens on first \"send\"\n// which will likely cause that message to be lost. This will be resolved using a buffer\n// in a later release. But for the moment all messages are volatile - hatchet isn't for mission critical\n// messages.\nhatchet.warmup();\n\n// Send 'log' event with data every 2 seconds\nsetInterval(function() {\n\tvar data = {\n\t\tline: 100,\n\t\tfile: 'ben.txt'\n\t};\n\thatchet.send('log', data);\n}, 2000);\n\n// Send 'signup' event with data every second\nsetInterval(function() {\n\tvar data = {\n\t\tfirstName: 'Frederick',\n\t\tlastName: 'Gustaveerson',\n\t\tcreated: new Date()\n\t};\n\thatchet.send('signup', data);\n}, 1000);\n```\n\n### Options\n\n```javascript\nvar hatchet = require('hatchet.io');\n\n// Enable logging\nhatch.options.log = true;\n```\n\n\n\n## Contributing\nPlease feel free to contribute. If you see any areas for improvement, particularly in regards to performance / reliability it'd be great to receive your pull requests / comments because it's really the main crux of the application.\n\n## Release History\n\n### 0.0.0\n\n- ADDED: Client library code that allows you to send and receive messages\n\n## License\nCopyright (c) 2013 Ben Pearson\nLicensed under the MIT license.","readmeFilename":"README.md","_id":"hatchet.io@0.0.0","dist":{"shasum":"72bab5d88050a837c97d8ae8dbda8762f6895a4d","tarball":"https://registry.npmjs.org/hatchet.io/-/hatchet.io-0.0.0.tgz","integrity":"sha512-sCpaJKPU35dqKOI/S/A7RYEy6GzpE8ucTNmH8gcApLBjY5/bJ6yj7lJvIHTnUYfSsd9LbqChu/+sf+PxvnDoig==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC0msp7cap2k/IJLOQyhpIqVIbGE0nLynW70m1aajXG8gIhAOXLpqRAzzvsZObqSEnwrjIQ/DukdrhL14T7e8OhPaIV"}]},"_npmVersion":"1.1.65","_npmUser":{"name":"benjaminpearson","email":"ben@developinginthedark.com"},"maintainers":[{"name":"benjaminpearson","email":"ben@developinginthedark.com"}],"directories":{}},"0.0.1":{"name":"hatchet.io","version":"0.0.1","description":"Hosted socket.io service with a simple API for sending and receiving messages.","homepage":"https://github.com/benjaminpearson/hatchet.io-node","author":{"name":"Ben Pearson","url":"http://hatchet.io"},"bugs":{"url":"https://github.com/benjaminpearson/hatchet.io-node/issues"},"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git://github.com/benjaminpearson/hatchet.io-node.git"},"engines":{"node":">= 0.6.0"},"licenses":[{"type":"MIT","url":"https://github.com/benjaminpearson/hatchet.io-node/blob/master/LICENSE-MIT"}],"dependencies":{"socket.io-client":"~0.9.11"},"readme":"# hatchet.io\n\nHosted (or self-hosted) socket.io service with a simple API for sending and receiving messages. It can be used for logging, analytics or any simple message broadcasting for your app.\n\n## Getting Started\n\nInstall the module with: `npm install hatchet.io`\n\n## Documentation\n\n_(Coming soon)_\n\n## Examples\n\n### Receiving Messages (Consumer)\n\n```javascript\nvar hatchet = require('hatchet.io');\n\nvar consumer = hatchet.consumer('demo', 'I6mMbTSOq4rCdM', { log: true });\n\n// Watch for 'log' events and run the defined function when it occurs\nconsumer.watch('log', function(data) {\n    console.log('log', data);\n});\n\n// Watch another\nconsumer.watch('signup', function(data) {\n\tconsole.log('signup', data);\n});\n\n// You can also stop listening to an event\nsetTimeout(function() {\n\tconsumer.unwatch('log');\n}, 20000);\n```\n\n### Sending Messages (Contributor)\n\n```javascript\nvar hatchet = require('hatchet.io');\n\nvar contributor = hatchet.contributor('demo', 'iYkrswPZVIrUMv', { log: true });\n\n// Send 'log' event with data every 2 seconds\nsetInterval(function() {\n\tvar data = {\n\t\tline: 100,\n\t\tfile: 'ben.txt'\n\t};\n\tcontributor.send('log', data);\n}, 2000);\n\n// Send 'signup' event with data every second\nsetInterval(function() {\n\tvar data = {\n\t\tfirstName: 'Frederick',\n\t\tlastName: 'Gustaveerson',\n\t\tcreated: new Date()\n\t};\n\tcontributor.send('signup', data);\n}, 1000);\n```\n\n### Options - Defaults\n\n```javascript\n{\n\tlog: false // when enabled it will console.log out hatchet related log messages\n}\n```\n\n## Contributing\nPlease feel free to contribute. If you see any areas for improvement, particularly in regards to performance / reliability it'd be great to receive your pull requests / comments because it's really the main crux of the application.\n\n## Release History\n\n### 0.0.1\n\n- FIXED: Changed the api so that you can create multiple consumers or clients from the one `require('hatchet.io')`. Previously you could only have one connection.\n- CHANGED: The API for creating a connection has changed. Please see updated examples.\n- ADDED: Examples scripts added.\n- ADDED: Queuing for contributors if events come in prior to socket authenticating\n\n### 0.0.0\n\n- ADDED: Client library code that allows you to send and receive messages.\n\n## License\nCopyright (c) 2013 Ben Pearson\nLicensed under the MIT license.","readmeFilename":"README.md","_id":"hatchet.io@0.0.1","dist":{"shasum":"02b0512b60b5cfdfabf43b16e6dbb6f2e477e9ef","tarball":"https://registry.npmjs.org/hatchet.io/-/hatchet.io-0.0.1.tgz","integrity":"sha512-XkAXhPrm0Tt9bF53Bfnhsc265CPgdixMzmbRtJvOSpJIbs1YOzeUyMnWFL73JokG58vUz5wpzlQmqt+4tbqDtA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB1k4VGWslqSL2kEfppNyfJ0OcQA5Y8NR7nXy5pMoNL1AiBxuntVks/fOiPYNenbU4Nuks64k/fxM9AadqRenTktBg=="}]},"_npmVersion":"1.1.65","_npmUser":{"name":"benjaminpearson","email":"ben@developinginthedark.com"},"maintainers":[{"name":"benjaminpearson","email":"ben@developinginthedark.com"}],"directories":{}},"0.0.2":{"name":"hatchet.io","version":"0.0.2","description":"Hosted socket.io service with a simple API for sending and receiving messages.","homepage":"https://github.com/benjaminpearson/hatchet.io-node","author":{"name":"Ben Pearson","url":"http://hatchet.io"},"bugs":{"url":"https://github.com/benjaminpearson/hatchet.io-node/issues"},"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git://github.com/benjaminpearson/hatchet.io-node.git"},"engines":{"node":">= 0.6.0"},"licenses":[{"type":"MIT","url":"https://github.com/benjaminpearson/hatchet.io-node/blob/master/LICENSE-MIT"}],"dependencies":{"socket.io-client":"~0.9.11"},"readme":"# hatchet.io\n\nHosted (or self-hosted) socket.io service with a simple API for sending and receiving messages. It can be used for logging, analytics or any simple message broadcasting for your app.\n\n## --- Not Production Ready. Breaking changes will be occuring often at this stage. ---\n\n## Getting Started\n\nInstall the module with: `npm install hatchet.io`\n\n## Documentation\n\n_(Coming soon)_\n\n## Examples\n\n### Receiving Messages (Consumer)\n\n```javascript\nvar hatchet = require('hatchet.io');\n\nvar consumer = hatchet.consumer('demo', 'I6mMbTSOq4rCdM', { log: true });\n\n// Watch for 'log' events and run the defined function when it occurs\nconsumer.watch('log', function(data) {\n    console.log('log', data);\n});\n\n// Watch another\nconsumer.watch('signup', function(data) {\n\tconsole.log('signup', data);\n});\n\n// You can also stop listening to an event\nsetTimeout(function() {\n\tconsumer.unwatch('log');\n}, 20000);\n```\n\n### Sending Messages (Contributor)\n\n```javascript\nvar hatchet = require('hatchet.io');\n\nvar contributor = hatchet.contributor('demo', 'iYkrswPZVIrUMv', { log: true });\n\n// Send 'log' event with data every 2 seconds\nsetInterval(function() {\n\tvar data = {\n\t\tline: 100,\n\t\tfile: 'ben.txt'\n\t};\n\tcontributor.send('log', data);\n}, 2000);\n\n// Send 'signup' event with data every second\nsetInterval(function() {\n\tvar data = {\n\t\tfirstName: 'Frederick',\n\t\tlastName: 'Gustaveerson',\n\t\tcreated: new Date()\n\t};\n\tcontributor.send('signup', data);\n}, 1000);\n```\n\n### Options - Defaults\n\n```javascript\n{\n\tlog: false // when enabled it will console.log out hatchet related log messages\n}\n```\n\n## Contributing\nPlease feel free to contribute. If you see any areas for improvement, particularly in regards to performance / reliability it'd be great to receive your pull requests / comments because it's really the main crux of the application.\n\n## Release History\n\n### 0.0.2\n\n- CHANGED: Contributors now have \"broadcast\" and \"send\" that allow you to send to all users or target a specific user(s)\n\n### 0.0.1\n\n- FIXED: Changed the api so that you can create multiple consumers or clients from the one `require('hatchet.io')`. Previously you could only have one connection.\n- CHANGED: The API for creating a connection has changed. Please see updated examples.\n- ADDED: Examples scripts added.\n- ADDED: Queuing for contributors if events come in prior to socket authenticating\n\n### 0.0.0\n\n- ADDED: Client library code that allows you to send and receive messages.\n\n## License\nCopyright (c) 2013 Ben Pearson\nLicensed under the MIT license.\n","readmeFilename":"README.md","_id":"hatchet.io@0.0.2","dist":{"shasum":"26dea66961baa2ec20fa1434334f0a4cb1855440","tarball":"https://registry.npmjs.org/hatchet.io/-/hatchet.io-0.0.2.tgz","integrity":"sha512-2wywF7CfI16kc3N13e+58qzsQfSU+8Hwv/Jj3WgPrkc7McXCDATGd59oKjT1MZzsGXPuPI43MQ4pQKJnEKQEnw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICst7Gl/5WDLiKBRT6qd+qB/FZ4HVlL4+hf7WSYmIbffAiAU3SxDA9ibnmf+neud7LtzT/vzMYOyKQezoWRFsqJeew=="}]},"_npmVersion":"1.1.65","_npmUser":{"name":"benjaminpearson","email":"ben@developinginthedark.com"},"maintainers":[{"name":"benjaminpearson","email":"ben@developinginthedark.com"}],"directories":{}},"0.0.3":{"name":"hatchet.io","version":"0.0.3","description":"Hosted socket.io service with a simple API for sending and receiving messages.","homepage":"https://github.com/benjaminpearson/hatchet.io-node","author":{"name":"Ben Pearson","url":"http://hatchet.io"},"bugs":{"url":"https://github.com/benjaminpearson/hatchet.io-node/issues"},"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git://github.com/benjaminpearson/hatchet.io-node.git"},"engines":{"node":">= 0.6.0"},"licenses":[{"type":"MIT","url":"https://github.com/benjaminpearson/hatchet.io-node/blob/master/LICENSE-MIT"}],"dependencies":{"socket.io-client":"~0.9.11"},"readme":"# hatchet.io\n\nHosted (or self-hosted) socket.io service with a simple API for sending and receiving messages. It can be used for logging, analytics or any simple message broadcasting for your app.\n\n## --- Not Production Ready. Breaking changes will be occuring often at this stage. ---\n\n## Getting Started\n\nInstall the module with: `npm install hatchet.io`\n\n## Documentation\n\n_(Coming soon)_\n\n## Examples\n\n### Receiving Messages (Consumer)\n\n```javascript\nvar hatchet = require('hatchet.io');\n\nvar consumer = hatchet.consumer('demo', 'I6mMbTSOq4rCdM', { log: true });\n\n// Watch for 'log' events and run the defined function when it occurs\nconsumer.watch('log', function(data) {\n    console.log('log', data);\n});\n\n// Watch another\nconsumer.watch('signup', function(data) {\n\tconsole.log('signup', data);\n});\n\n// You can also stop listening to an event\nsetTimeout(function() {\n\tconsumer.unwatch('log');\n}, 20000);\n```\n\n### Sending Messages (Contributor)\n\n```javascript\nvar hatchet = require('hatchet.io');\n\nvar contributor = hatchet.contributor('demo', 'iYkrswPZVIrUMv', { log: true });\n\n// Send 'log' event with data every 2 seconds\nsetInterval(function() {\n\tvar data = {\n\t\tline: 100,\n\t\tfile: 'ben.txt'\n\t};\n\tcontributor.send('log', data);\n}, 2000);\n\n// Send 'signup' event with data every second\nsetInterval(function() {\n\tvar data = {\n\t\tfirstName: 'Frederick',\n\t\tlastName: 'Gustaveerson',\n\t\tcreated: new Date()\n\t};\n\tcontributor.send('signup', data);\n}, 1000);\n```\n\n### Options - Defaults\n\n```javascript\n{\n\tlog: false // when enabled it will console.log out hatchet related log messages\n}\n```\n\n## Contributing\nPlease feel free to contribute. If you see any areas for improvement, particularly in regards to performance / reliability it'd be great to receive your pull requests / comments because it's really the main crux of the application.\n\n## Release History\n\n### 0.0.3\n- FIXED: Fixed missing alias property.\n\n### 0.0.2\n\n- CHANGED: Contributors now have \"broadcast\" and \"send\" that allow you to send to all users or target a specific user(s)\n\n### 0.0.1\n\n- FIXED: Changed the api so that you can create multiple consumers or clients from the one `require('hatchet.io')`. Previously you could only have one connection.\n- CHANGED: The API for creating a connection has changed. Please see updated examples.\n- ADDED: Examples scripts added.\n- ADDED: Queuing for contributors if events come in prior to socket authenticating\n\n### 0.0.0\n\n- ADDED: Client library code that allows you to send and receive messages.\n\n## License\nCopyright (c) 2013 Ben Pearson\nLicensed under the MIT license.\n","readmeFilename":"README.md","_id":"hatchet.io@0.0.3","dist":{"shasum":"24f45985045c9495ddf95cf0bed58c8deae1428a","tarball":"https://registry.npmjs.org/hatchet.io/-/hatchet.io-0.0.3.tgz","integrity":"sha512-AIIwgAEQv1Q669hAY1pn2cl8LUd+v/vbyjwuH21BGzzh6Wb3yRC8taLQUcX6NpxFf6vm542tp9cle8eEAtm0Hw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHJ5qnG+YWeCJZnhRw6Rnkk6Ac9LLMKAxfEiz0yKV64bAiEA4QLD/+Wr7MXgFPGX+rP2oWr0c9k/hbRBRJN2oxdpWfM="}]},"_npmVersion":"1.1.65","_npmUser":{"name":"benjaminpearson","email":"ben@developinginthedark.com"},"maintainers":[{"name":"benjaminpearson","email":"ben@developinginthedark.com"}]},"0.0.4":{"name":"hatchet.io","version":"0.0.4","description":"Hosted socket.io service with a simple API for sending and receiving messages.","homepage":"https://github.com/benjaminpearson/hatchet.io-node","author":{"name":"Ben Pearson","url":"http://hatchet.io"},"bugs":{"url":"https://github.com/benjaminpearson/hatchet.io-node/issues"},"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git://github.com/benjaminpearson/hatchet.io-node.git"},"engines":{"node":">= 0.6.0"},"licenses":[{"type":"MIT","url":"https://github.com/benjaminpearson/hatchet.io-node/blob/master/LICENSE-MIT"}],"dependencies":{"socket.io-client":"~0.9.11"},"readme":"# hatchet.io\n\nHosted (or self-hosted) socket.io service with a simple API for sending and receiving messages. It can be used for logging, analytics or any simple message broadcasting for your app.\n\n## --- Not Production Ready. Breaking changes will be occuring often at this stage. ---\n\n## Getting Started\n\nInstall the module with: `npm install hatchet.io`\n\n## Documentation\n\n_(Coming soon)_\n\n## Examples\n\n### Receiving Messages (Consumer)\n\n```javascript\nvar hatchet = require('hatchet.io');\n\nvar consumer = hatchet.consumer('demo', 'I6mMbTSOq4rCdM', { log: true });\n\n// Watch for 'log' events and run the defined function when it occurs\nconsumer.watch('log', function(data) {\n    console.log('log', data);\n});\n\n// Watch another\nconsumer.watch('signup', function(data) {\n\tconsole.log('signup', data);\n});\n\n// You can also stop listening to an event\nsetTimeout(function() {\n\tconsumer.unwatch('log');\n}, 20000);\n```\n\n### Sending Messages (Contributor)\n\n```javascript\nvar hatchet = require('hatchet.io');\n\nvar contributor = hatchet.contributor('demo', 'iYkrswPZVIrUMv', { log: true });\n\n// Send 'log' event with data every 2 seconds\nsetInterval(function() {\n\tvar data = {\n\t\tline: 100,\n\t\tfile: 'ben.txt'\n\t};\n\tcontributor.send('log', data);\n}, 2000);\n\n// Send 'signup' event with data every second\nsetInterval(function() {\n\tvar data = {\n\t\tfirstName: 'Frederick',\n\t\tlastName: 'Gustaveerson',\n\t\tcreated: new Date()\n\t};\n\tcontributor.send('signup', data);\n}, 1000);\n```\n\n### Options - Defaults\n\n```javascript\n{\n\tlog: false // when enabled it will console.log out hatchet related log messages\n}\n```\n\n## Contributing\nPlease feel free to contribute. If you see any areas for improvement, particularly in regards to performance / reliability it'd be great to receive your pull requests / comments because it's really the main crux of the application.\n\n## Release History\n\n### 0.0.3\n- FIXED: Fixed missing alias property.\n\n### 0.0.2\n\n- CHANGED: Contributors now have \"broadcast\" and \"send\" that allow you to send to all users or target a specific user(s)\n\n### 0.0.1\n\n- FIXED: Changed the api so that you can create multiple consumers or clients from the one `require('hatchet.io')`. Previously you could only have one connection.\n- CHANGED: The API for creating a connection has changed. Please see updated examples.\n- ADDED: Examples scripts added.\n- ADDED: Queuing for contributors if events come in prior to socket authenticating\n\n### 0.0.0\n\n- ADDED: Client library code that allows you to send and receive messages.\n\n## License\nCopyright (c) 2013 Ben Pearson\nLicensed under the MIT license.\n","readmeFilename":"README.md","_id":"hatchet.io@0.0.4","dist":{"shasum":"5083b3096e23d3866cf7babee688547c4c219d6f","tarball":"https://registry.npmjs.org/hatchet.io/-/hatchet.io-0.0.4.tgz","integrity":"sha512-27uEoMafbjPjj1RkrKhggAPlPBKxNs5sxip65+ZGzbxAgCdkGTtJnbnCVDTW5z7rH6+83yhkmcNuxPPaSKTVew==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIClCCTZY1GfpI717xcApWuR4M16cJQjpf4Sef2m6TsuQAiBSKJswpOMMsOlPb1bNT+fzfGRXUEum6UqwmLqYyvObyw=="}]},"_npmVersion":"1.1.65","_npmUser":{"name":"benjaminpearson","email":"ben@developinginthedark.com"},"maintainers":[{"name":"benjaminpearson","email":"ben@developinginthedark.com"}]},"0.0.5":{"name":"hatchet.io","version":"0.0.5","description":"Hosted socket.io service with a simple API for sending and receiving messages.","homepage":"https://github.com/benjaminpearson/hatchet.io-node","author":{"name":"Ben Pearson","url":"http://hatchet.io"},"bugs":{"url":"https://github.com/benjaminpearson/hatchet.io-node/issues"},"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git://github.com/benjaminpearson/hatchet.io-node.git"},"engines":{"node":">= 0.6.0"},"licenses":[{"type":"MIT","url":"https://github.com/benjaminpearson/hatchet.io-node/blob/master/LICENSE-MIT"}],"dependencies":{"socket.io-client":"~0.9.11"},"readme":"# hatchet.io\n\nHosted (or self-hosted) socket.io service with a simple API for sending and receiving messages. It can be used for logging, analytics or any simple message broadcasting for your app.\n\n## --- Not Production Ready. Breaking changes will be occuring often at this stage. ---\n\n## Getting Started\n\nInstall the module with: `npm install hatchet.io`\n\n## Documentation\n\n_(Coming soon)_\n\n## Examples\n\n### Receiving Messages (Consumer)\n\n```javascript\nvar hatchet = require('hatchet.io');\n\nvar consumer = hatchet.consumer('demo', 'I6mMbTSOq4rCdM', { log: true });\n\n// Watch for 'log' events and run the defined function when it occurs\nconsumer.watch('log', function(data) {\n    console.log('log', data);\n});\n\n// Watch another\nconsumer.watch('signup', function(data) {\n\tconsole.log('signup', data);\n});\n\n// You can also stop listening to an event\nsetTimeout(function() {\n\tconsumer.unwatch('log');\n}, 20000);\n```\n\n### Sending Messages (Contributor)\n\n```javascript\nvar hatchet = require('hatchet.io');\n\nvar contributor = hatchet.contributor('demo', 'iYkrswPZVIrUMv', { log: true });\n\n// Send 'log' event with data every 2 seconds\nsetInterval(function() {\n\tvar data = {\n\t\tline: 100,\n\t\tfile: 'ben.txt'\n\t};\n\tcontributor.send('log', data);\n}, 2000);\n\n// Send 'signup' event with data every second\nsetInterval(function() {\n\tvar data = {\n\t\tfirstName: 'Frederick',\n\t\tlastName: 'Gustaveerson',\n\t\tcreated: new Date()\n\t};\n\tcontributor.send('signup', data);\n}, 1000);\n```\n\n### Options - Defaults\n\n```javascript\n{\n\tlog: false // when enabled it will console.log out hatchet related log messages\n}\n```\n\n## Contributing\nPlease feel free to contribute. If you see any areas for improvement, particularly in regards to performance / reliability it'd be great to receive your pull requests / comments because it's really the main crux of the application.\n\n## Release History\n\n### 0.0.3\n- FIXED: Fixed missing alias property.\n\n### 0.0.2\n\n- CHANGED: Contributors now have \"broadcast\" and \"send\" that allow you to send to all users or target a specific user(s)\n\n### 0.0.1\n\n- FIXED: Changed the api so that you can create multiple consumers or clients from the one `require('hatchet.io')`. Previously you could only have one connection.\n- CHANGED: The API for creating a connection has changed. Please see updated examples.\n- ADDED: Examples scripts added.\n- ADDED: Queuing for contributors if events come in prior to socket authenticating\n\n### 0.0.0\n\n- ADDED: Client library code that allows you to send and receive messages.\n\n## License\nCopyright (c) 2013 Ben Pearson\nLicensed under the MIT license.\n","readmeFilename":"README.md","_id":"hatchet.io@0.0.5","dist":{"shasum":"96b67d1e36b527986e5d067f7431327171931f23","tarball":"https://registry.npmjs.org/hatchet.io/-/hatchet.io-0.0.5.tgz","integrity":"sha512-a3BKQg/HoRyBGiwXMu4GgYl6a3z8chkXlPJCfLWsoo9oPxNYCnsANhW8ZDH02Ly7OzhME/M4WYdPATW9saHUzw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCreEmWVz+LawviPSR9FKL3roQKHc8YdAscFHfcI/gVFQIgCV8U+1XLIio7z8TYELKJzC5M7hfGO221iBzbqIXXLI8="}]},"_npmVersion":"1.1.65","_npmUser":{"name":"benjaminpearson","email":"ben@developinginthedark.com"},"maintainers":[{"name":"benjaminpearson","email":"ben@developinginthedark.com"}]},"0.0.6":{"name":"hatchet.io","version":"0.0.6","description":"Hosted socket.io service with a simple API for sending and receiving messages.","homepage":"https://github.com/benjaminpearson/hatchet.io","author":{"name":"Ben Pearson","url":"http://hatchet.io"},"bugs":{"url":"https://github.com/benjaminpearson/hatchet.io/issues"},"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git://github.com/benjaminpearson/hatchet.io.git"},"engines":{"node":">= 0.6.0"},"licenses":[{"type":"MIT","url":"https://github.com/benjaminpearson/hatchet.io/blob/master/LICENSE-MIT"}],"dependencies":{"socket.io-client":"~0.9.11"},"readme":"# hatchet.io\n\nHosted (or self-hosted) socket.io service with a simple API for sending and receiving messages. It can be used for logging, analytics or any simple message broadcasting for your app.\n\n## --- Not Production Ready. Breaking changes will be occuring often at this stage. ---\n\n## Getting Started\n\nInstall the module with: `npm install hatchet.io`\n\n## Documentation\n\n_(Coming soon)_\n\n## Examples\n\n### Receiving Messages (Consumer)\n\n```javascript\nvar hatchet = require('hatchet.io');\n\nvar consumer = hatchet.consumer('demo', 'I6mMbTSOq4rCdM', { log: true });\n\n// Watch for 'log' events and run the defined function when it occurs\nconsumer.watch('log', function(data) {\n    console.log('log', data);\n});\n\n// Watch another\nconsumer.watch('signup', function(data) {\n\tconsole.log('signup', data);\n});\n\n// You can also stop listening to an event\nsetTimeout(function() {\n\tconsumer.unwatch('log');\n}, 20000);\n```\n\n### Sending Messages (Contributor)\n\n```javascript\nvar hatchet = require('hatchet.io');\n\nvar contributor = hatchet.contributor('demo', 'iYkrswPZVIrUMv', { log: true });\n\n// Send 'log' event with data every 2 seconds\nsetInterval(function() {\n\tvar data = {\n\t\tline: 100,\n\t\tfile: 'ben.txt'\n\t};\n\tcontributor.send('log', data);\n}, 2000);\n\n// Send 'signup' event with data every second\nsetInterval(function() {\n\tvar data = {\n\t\tfirstName: 'Frederick',\n\t\tlastName: 'Gustaveerson',\n\t\tcreated: new Date()\n\t};\n\tcontributor.send('signup', data);\n}, 1000);\n```\n\n### Options - Defaults\n\n```javascript\n{\n\tlog: false // when enabled it will console.log out hatchet related log messages\n}\n```\n\n## Contributing\nPlease feel free to contribute. If you see any areas for improvement, particularly in regards to performance / reliability it'd be great to receive your pull requests / comments because it's really the main crux of the application.\n\n## Release History\n\n### 0.0.3\n- FIXED: Fixed missing alias property.\n\n### 0.0.2\n\n- CHANGED: Contributors now have \"broadcast\" and \"send\" that allow you to send to all users or target a specific user(s)\n\n### 0.0.1\n\n- FIXED: Changed the api so that you can create multiple consumers or clients from the one `require('hatchet.io')`. Previously you could only have one connection.\n- CHANGED: The API for creating a connection has changed. Please see updated examples.\n- ADDED: Examples scripts added.\n- ADDED: Queuing for contributors if events come in prior to socket authenticating\n\n### 0.0.0\n\n- ADDED: Client library code that allows you to send and receive messages.\n\n## License\nCopyright (c) 2013 Ben Pearson\nLicensed under the MIT license.\n","readmeFilename":"README.md","_id":"hatchet.io@0.0.6","dist":{"shasum":"efeb5aa94d0f4333b4e13f4ded7404fd45fe3c40","tarball":"https://registry.npmjs.org/hatchet.io/-/hatchet.io-0.0.6.tgz","integrity":"sha512-Pkw3OST6e6ECzlhvsZonAg9Hqk8acx8vFH7yoKmM7iZA7XqeucbkI7UvN1XAkB0XcuEmaYYO3b04qKEcx6MoAg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC92SMuFdI8Z9RFiuLtJUlcXJwmN1GEyMX44hcQjc1CmQIgO84fk0HhMXpC1CBNMebHt+7lqCgRJ5eg70xTACpe1cc="}]},"_npmVersion":"1.1.65","_npmUser":{"name":"benjaminpearson","email":"ben@developinginthedark.com"},"maintainers":[{"name":"benjaminpearson","email":"ben@developinginthedark.com"}]}},"readme":"# hatchet.io\n\nHosted (or self-hosted) socket.io service with a simple API for sending and receiving messages. It can be used for logging, analytics or any simple message broadcasting for your app.\n\n## Getting Started\n\nInstall the module with: `npm install hatchet.io`\n\n## Documentation\n\n_(Coming soon)_\n\n## Examples\n\n### Receiving Messages\n\n```javascript\nvar hatchet = require('hatchet.io');\n\nhatchet.authenticate('http://douglas.hatchet.io:1337', 'demo', 'iYkrswPZVIrUMv');\n\n// Watch for 'log' events and run the defined function when it occurs\nhatchet.watch('log', function(data) {\n\tconsole.log('log', data);\n});\n\n// Watch another\nhatchet.watch('signup', function(data) {\n\tconsole.log('signup', data);\n});\n\n// You can also stop listening to an event\nsetTimeout(function() {\n\thatchet.unwatch('log');\n}, 20000);\n```\n\n### Sending Messages\n\n```javascript\nvar hatchet = require('hatchet.io');\n\nhatchet.authenticate('http://douglas.hatchet.io:1338', 'demo', 'iYkrswPZVIrUMv');\n\n// Warmup begins connection + auth process to server, otherwise it happens on first \"send\"\n// which will likely cause that message to be lost. This will be resolved using a buffer\n// in a later release. But for the moment all messages are volatile - hatchet isn't for mission critical\n// messages.\nhatchet.warmup();\n\n// Send 'log' event with data every 2 seconds\nsetInterval(function() {\n\tvar data = {\n\t\tline: 100,\n\t\tfile: 'ben.txt'\n\t};\n\thatchet.send('log', data);\n}, 2000);\n\n// Send 'signup' event with data every second\nsetInterval(function() {\n\tvar data = {\n\t\tfirstName: 'Frederick',\n\t\tlastName: 'Gustaveerson',\n\t\tcreated: new Date()\n\t};\n\thatchet.send('signup', data);\n}, 1000);\n```\n\n### Options\n\n```javascript\nvar hatchet = require('hatchet.io');\n\n// Enable logging\nhatch.options.log = true;\n```\n\n\n\n## Contributing\nPlease feel free to contribute. If you see any areas for improvement, particularly in regards to performance / reliability it'd be great to receive your pull requests / comments because it's really the main crux of the application.\n\n## Release History\n\n### 0.0.0\n\n- ADDED: Client library code that allows you to send and receive messages\n\n## License\nCopyright (c) 2013 Ben Pearson\nLicensed under the MIT license.","maintainers":[{"name":"benjaminpearson","email":"ben@developinginthedark.com"}],"time":{"modified":"2022-06-18T19:34:09.348Z","created":"2013-01-19T09:33:38.359Z","0.0.0":"2013-01-19T09:33:42.667Z","0.0.1":"2013-02-12T20:57:15.846Z","0.0.2":"2013-02-13T00:10:22.476Z","0.0.3":"2013-03-04T00:35:10.460Z","0.0.4":"2013-03-04T00:37:51.148Z","0.0.5":"2013-03-06T23:07:28.279Z","0.0.6":"2013-04-09T13:04:14.326Z"},"author":{"name":"Ben Pearson","url":"http://hatchet.io"},"repository":{"type":"git","url":"git://github.com/benjaminpearson/hatchet.io.git"}}