{"_id":"lore-websockets","_rev":"50-39d2a49d27701640d731f9075c789bf5","name":"lore-websockets","description":"Common code used by all lore-hook-websockets-* packages","dist-tags":{"latest":"0.13.0","next":"0.13.0-rc.2"},"versions":{"0.9.0-rc.1":{"name":"lore-websockets","version":"0.9.0-rc.1","license":"MIT","description":"Common code used by all lore-hook-websockets-* packages","homepage":"https://github.com/lore/lore#readme","main":"lib/index.js","repository":{"type":"git","url":"git+https://github.com/lore/lore.git"},"bugs":{"url":"https://github.com/lore/lore/issues"},"scripts":{"build":"../../node_modules/.bin/babel src --out-dir lib","clean":"rimraf lib","debug":"mocha debug --compilers js:babel-core/register --recursive","prepublish":"npm run build","test":"mocha --compilers js:babel-core/register --recursive"},"dependencies":{"lodash":"^4.0.0"},"devDependencies":{"chai":"3.4.1","mocha":"2.3.4","rimraf":"2.5.2","sinon":"1.17.2"},"_id":"lore-websockets@0.9.0-rc.1","_shasum":"f33834e5e062ef5fe1176ab7a770ea6ac23f567b","_from":".","_npmVersion":"3.9.5","_nodeVersion":"6.2.2","_npmUser":{"name":"jchansen","email":"jason_hansen@outlook.com"},"dist":{"shasum":"f33834e5e062ef5fe1176ab7a770ea6ac23f567b","tarball":"https://registry.npmjs.org/lore-websockets/-/lore-websockets-0.9.0-rc.1.tgz","integrity":"sha512-+gke9ZAq8lQ4mVqsNsv5kJFrEzc/2tTfYb5LHiNAvWGnPvZfF7tyYlAi/gAmkaeT4ThMSCAxQ5oyavP9MeH9zQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID280i5R0vnfud6Kcu78uo92CP/3N6WL8gK6ciYXmrwUAiBCjKb4g2++rB9meqMElNkO+ACAg2VOra2U4YSrDP2eng=="}]},"maintainers":[{"name":"jchansen","email":"jason_hansen@outlook.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/lore-websockets-0.9.0-rc.1.tgz_1473454914370_0.7930615341756493"},"directories":{}},"0.9.0":{"name":"lore-websockets","version":"0.9.0","license":"MIT","description":"Common code used by all lore-hook-websockets-* packages","homepage":"https://github.com/lore/lore#readme","main":"lib/index.js","repository":{"type":"git","url":"git+https://github.com/lore/lore.git"},"bugs":{"url":"https://github.com/lore/lore/issues"},"scripts":{"build":"../../node_modules/.bin/babel src --out-dir lib","clean":"rimraf lib","debug":"mocha debug --compilers js:babel-core/register --recursive","prepublish":"npm run build","test":"mocha --compilers js:babel-core/register --recursive"},"dependencies":{"lodash":"^4.0.0"},"devDependencies":{"chai":"3.4.1","mocha":"2.3.4","rimraf":"2.5.2","sinon":"1.17.2"},"_id":"lore-websockets@0.9.0","_shasum":"f49622ee58e1af7b4f8a6268bbb04a2bd740852e","_from":".","_npmVersion":"3.9.5","_nodeVersion":"6.2.2","_npmUser":{"name":"jchansen","email":"jason_hansen@outlook.com"},"dist":{"shasum":"f49622ee58e1af7b4f8a6268bbb04a2bd740852e","tarball":"https://registry.npmjs.org/lore-websockets/-/lore-websockets-0.9.0.tgz","integrity":"sha512-IvU+RS5FuNB2pIzRC3Tguooa8JJwgJUdOoc3nDxIo7sKasvft83YjlYYx7PlYEsgFMfpuctRXr8viFQ7BuMQBw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBptlJZ+Ya7lqFv9EqbJ1V2FgLdfWK+cp/f/f+h9Qyc9AiEA7HMg8OLMoaQS6V/mL7rhUPcITLbpHNU4a1R6e2yhVls="}]},"maintainers":[{"name":"jchansen","email":"jason_hansen@outlook.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/lore-websockets-0.9.0.tgz_1473582767180_0.7078590798191726"},"directories":{}},"0.10.0-beta.1":{"name":"lore-websockets","version":"0.10.0-beta.1","license":"MIT","description":"Common code used by all lore-hook-websockets-* packages","homepage":"https://github.com/lore/lore#readme","main":"lib/index.js","repository":{"type":"git","url":"git+https://github.com/lore/lore.git"},"bugs":{"url":"https://github.com/lore/lore/issues"},"scripts":{"build":"../../node_modules/.bin/babel src --out-dir lib","clean":"rimraf lib","debug":"mocha debug --compilers js:babel-core/register --recursive","prepublish":"npm run build","test":"mocha --compilers js:babel-core/register --recursive"},"dependencies":{"lodash":"^4.0.0"},"devDependencies":{"chai":"3.4.1","mocha":"2.3.4","rimraf":"2.5.2","sinon":"1.17.2"},"_id":"lore-websockets@0.10.0-beta.1","_shasum":"7cc66f9af868b81fdacaa972a75b344e4fe599ae","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.6.0","_npmUser":{"name":"jchansen","email":"jason_hansen@outlook.com"},"dist":{"shasum":"7cc66f9af868b81fdacaa972a75b344e4fe599ae","tarball":"https://registry.npmjs.org/lore-websockets/-/lore-websockets-0.10.0-beta.1.tgz","integrity":"sha512-mndIpJ1SkmLACVPmSy9OA0Zkkv3ChM4SN3QglOxIVBtw7fBcC7vWTkzEu1V2pRsT7kJTlywkBeUgrYlakfO+nA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC8oR+ks4XVxkbYVzU/ysZaZ37z3L0YCq8erYAlivrawgIhAJGaqNasCbz+ObeUSVr3HiupYqm9k9NTir016uDemtha"}]},"maintainers":[{"name":"jchansen","email":"jason_hansen@outlook.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/lore-websockets-0.10.0-beta.1.tgz_1475572933501_0.40815520216710865"},"directories":{}},"0.10.0":{"name":"lore-websockets","version":"0.10.0","license":"MIT","description":"Common code used by all lore-hook-websockets-* packages","homepage":"https://github.com/lore/lore#readme","main":"lib/index.js","repository":{"type":"git","url":"git+https://github.com/lore/lore.git"},"bugs":{"url":"https://github.com/lore/lore/issues"},"scripts":{"build":"../../node_modules/.bin/babel src --out-dir lib","clean":"rimraf lib","debug":"mocha debug --compilers js:babel-core/register --recursive","prepublish":"npm run build","test":"mocha --compilers js:babel-core/register --recursive"},"dependencies":{"lodash":"^4.0.0"},"devDependencies":{"chai":"3.4.1","mocha":"2.3.4","rimraf":"2.5.2","sinon":"1.17.2"},"_id":"lore-websockets@0.10.0","_shasum":"8972842ac8ec5e2bde7c2ab3013e80564204928f","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.6.0","_npmUser":{"name":"jchansen","email":"jason_hansen@outlook.com"},"dist":{"shasum":"8972842ac8ec5e2bde7c2ab3013e80564204928f","tarball":"https://registry.npmjs.org/lore-websockets/-/lore-websockets-0.10.0.tgz","integrity":"sha512-NSrOl14/BtZ6y4Dg3H3Oy1a6AXhgP0qGaFSKh6YEwOBD+XH9Vsg/c+qw7+qP9s8uXp9kCGgdELHF6585VyOfaQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDXnmZfe3ok4CVd1Jw0bK49y4CAAsbgl0JUxnweGqVLOgIgW5HjvLFcTtg+tnOaigRgLIKCmkOZz9SrzeqjnPBENds="}]},"maintainers":[{"name":"jchansen","email":"jason_hansen@outlook.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/lore-websockets-0.10.0.tgz_1476337414924_0.9633255703374743"},"directories":{}},"0.11.0-beta.1":{"name":"lore-websockets","version":"0.11.0-beta.1","license":"MIT","description":"Common code used by all lore-hook-websockets-* packages","homepage":"https://github.com/lore/lore#readme","main":"lib/index.js","repository":{"type":"git","url":"git+https://github.com/lore/lore.git"},"bugs":{"url":"https://github.com/lore/lore/issues"},"scripts":{"build":"../../node_modules/.bin/babel src --out-dir lib","clean":"rimraf lib","debug":"mocha debug --compilers js:babel-core/register --recursive","prepublish":"npm run build","test":"mocha --compilers js:babel-core/register --recursive"},"dependencies":{"lodash":"^4.0.0"},"devDependencies":{"chai":"3.4.1","mocha":"2.3.4","rimraf":"2.5.2","sinon":"1.17.2"},"_id":"lore-websockets@0.11.0-beta.1","_shasum":"c310ead561ce0fe8e4f96a9b7a45e76f8d664765","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.6.0","_npmUser":{"name":"jchansen","email":"jason_hansen@outlook.com"},"dist":{"shasum":"c310ead561ce0fe8e4f96a9b7a45e76f8d664765","tarball":"https://registry.npmjs.org/lore-websockets/-/lore-websockets-0.11.0-beta.1.tgz","integrity":"sha512-ZZZ9+rwfruwEFjE65bGYJvRA8GAg1SMZ5ixFZ1rSdXEl8QqjBRtQMc7eLjT81ujYW0HwA9oGwbGXpxdU4lEJDw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH3OC8T/+0VBKd43HAG4nTeFRdbsVc3aKz+OT+DhXJ2xAiBLts60SikH+fyZC3GNRW0I782ETp7AxjZOidZ7GL1HKA=="}]},"maintainers":[{"name":"jchansen","email":"jason_hansen@outlook.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/lore-websockets-0.11.0-beta.1.tgz_1481523880607_0.9456864206586033"},"directories":{}},"0.11.0-rc.1":{"name":"lore-websockets","version":"0.11.0-rc.1","license":"MIT","description":"Common code used by all lore-hook-websockets-* packages","homepage":"https://github.com/lore/lore#readme","main":"lib/index.js","repository":{"type":"git","url":"git+https://github.com/lore/lore.git"},"bugs":{"url":"https://github.com/lore/lore/issues"},"scripts":{"build":"../../node_modules/.bin/babel src --out-dir lib","clean":"rimraf lib","debug":"mocha debug --compilers js:babel-core/register --recursive","prepublish":"npm run build","test":"mocha --compilers js:babel-core/register --recursive"},"dependencies":{"lodash":"^4.0.0"},"devDependencies":{"chai":"3.4.1","mocha":"2.3.4","rimraf":"2.5.2","sinon":"1.17.2"},"_id":"lore-websockets@0.11.0-rc.1","_shasum":"f6b2cc1191531f6cf83ef3fdb4b5807df02d38a7","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.6.0","_npmUser":{"name":"jchansen","email":"jason_hansen@outlook.com"},"dist":{"shasum":"f6b2cc1191531f6cf83ef3fdb4b5807df02d38a7","tarball":"https://registry.npmjs.org/lore-websockets/-/lore-websockets-0.11.0-rc.1.tgz","integrity":"sha512-Huk8rMl59zjGW0GnGJu27O2EI1CzDPxA4AEA2qtyhQi3PH4omf0pW3zaMhjQOzHDmlJlNr3M9cC21J91dd1B4g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB7MvAMjCkHP53dmL9QoQ4/fiqwuPH4szxzf+gjDNig6AiB80E/nPmpVRQh/MlFU+ymNXb4GJzUppO/jvq1+RNJ87w=="}]},"maintainers":[{"name":"jchansen","email":"jason_hansen@outlook.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/lore-websockets-0.11.0-rc.1.tgz_1485239127243_0.3967269631102681"},"directories":{}},"0.11.0":{"name":"lore-websockets","version":"0.11.0","license":"MIT","description":"Common code used by all lore-hook-websockets-* packages","homepage":"https://github.com/lore/lore#readme","main":"lib/index.js","repository":{"type":"git","url":"git+https://github.com/lore/lore.git"},"bugs":{"url":"https://github.com/lore/lore/issues"},"scripts":{"build":"../../node_modules/.bin/babel src --out-dir lib","clean":"rimraf lib","debug":"mocha debug --compilers js:babel-core/register --recursive","prepublish":"npm run build","test":"mocha --compilers js:babel-core/register --recursive"},"dependencies":{"lodash":"^4.0.0"},"devDependencies":{"chai":"3.4.1","mocha":"2.3.4","rimraf":"2.5.2","sinon":"1.17.2"},"_id":"lore-websockets@0.11.0","_shasum":"d6e72f016c30b5ca7021f74c0a5792535f2bbb1a","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.6.0","_npmUser":{"name":"jchansen","email":"jason_hansen@outlook.com"},"dist":{"shasum":"d6e72f016c30b5ca7021f74c0a5792535f2bbb1a","tarball":"https://registry.npmjs.org/lore-websockets/-/lore-websockets-0.11.0.tgz","integrity":"sha512-P5tNAoHlizLcojMPikQ6hxtqaxbFyBWBFEMCxRsOklYezoAVj19gXLPERI79agNNE9Ef0pLUdDk1MnPHyaDpBw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC4rm3QLjAF2NZYclj7e4nwH6C6gwSU1WBv33YQIiLb8gIhAM9nBXM/RWfHZnk3C+exyJU4Kg/EwM9Evv75AubQrQLO"}]},"maintainers":[{"name":"jchansen","email":"jason_hansen@outlook.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/lore-websockets-0.11.0.tgz_1485665727273_0.595442071557045"},"directories":{}},"0.12.0-beta.1":{"name":"lore-websockets","version":"0.12.0-beta.1","license":"MIT","description":"Common code used by all lore-hook-websockets-* packages","homepage":"https://github.com/lore/lore#readme","main":"lib/index.js","repository":{"type":"git","url":"git+https://github.com/lore/lore.git"},"bugs":{"url":"https://github.com/lore/lore/issues"},"scripts":{"build":"../../node_modules/.bin/babel src --out-dir lib","clean":"rimraf lib","debug":"mocha debug --compilers js:babel-core/register --recursive","prepublish":"npm run build","test":"mocha --compilers js:babel-core/register --recursive"},"dependencies":{"lodash":"^4.0.0"},"devDependencies":{"chai":"3.4.1","mocha":"2.3.4","rimraf":"2.5.2","sinon":"1.17.2"},"_id":"lore-websockets@0.12.0-beta.1","_shasum":"cc425cc7a82c1ea51f1e23ecc365dd36b522d0f0","_from":".","_npmVersion":"4.4.0","_nodeVersion":"6.6.0","_npmUser":{"name":"jchansen","email":"jason_hansen@outlook.com"},"dist":{"shasum":"cc425cc7a82c1ea51f1e23ecc365dd36b522d0f0","tarball":"https://registry.npmjs.org/lore-websockets/-/lore-websockets-0.12.0-beta.1.tgz","integrity":"sha512-NDkJM64gtIAXc1EtaR7huBGP3p2CvY2djTz1ZnH5BYpCWN1qZLJZxZaAVzY2qnbns+/6PiE92YaYUvwg3ruPkg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBSlDRjGl6SKUL5GQzTRrxoRAkRUU77HV4w2G2HvVDmaAiAG30KDXR658LX2YLCi0CMKaVO44J37XH7ThndojIDTew=="}]},"maintainers":[{"name":"jchansen","email":"jason_hansen@outlook.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/lore-websockets-0.12.0-beta.1.tgz_1488758375896_0.8230153613258153"},"directories":{}},"0.11.5":{"name":"lore-websockets","version":"0.11.5","license":"MIT","description":"Common code used by all lore-hook-websockets-* packages","homepage":"https://github.com/lore/lore#readme","main":"lib/index.js","repository":{"type":"git","url":"git+https://github.com/lore/lore.git"},"bugs":{"url":"https://github.com/lore/lore/issues"},"scripts":{"build":"../../node_modules/.bin/babel src --out-dir lib","clean":"rimraf lib","debug":"mocha debug --compilers js:babel-core/register --recursive","prepublish":"npm run build","test":"mocha --compilers js:babel-core/register --recursive"},"dependencies":{"lodash":"^4.0.0"},"devDependencies":{"chai":"3.4.1","mocha":"2.3.4","rimraf":"2.5.2","sinon":"1.17.2"},"_id":"lore-websockets@0.11.5","_shasum":"fbfe617161832a0bfadcf4a98706f787919d2c55","_from":".","_npmVersion":"4.4.4","_nodeVersion":"6.6.0","_npmUser":{"name":"jchansen","email":"jason_hansen@outlook.com"},"dist":{"shasum":"fbfe617161832a0bfadcf4a98706f787919d2c55","tarball":"https://registry.npmjs.org/lore-websockets/-/lore-websockets-0.11.5.tgz","integrity":"sha512-XXmgVKg4sOaFRJpwu62QBKMEsC5iIcQO449suXJi5ikF1uaXdSo5WoxMfkw8MDeZjL0XN7JQbBgQFVLreyfbjA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD67CPHMchlwWoHU+kmQsg7n/9QqMhjrFEq9v5H6+bRVAIgLYciK2mPVE1EYh9WuxaSLybKDnoflyLnWkL3MK64ar4="}]},"maintainers":[{"name":"jchansen","email":"jason_hansen@outlook.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/lore-websockets-0.11.5.tgz_1493712366587_0.8754773414693773"},"directories":{}},"0.12.0-rc.1":{"name":"lore-websockets","version":"0.12.0-rc.1","license":"MIT","description":"Common code used by all lore-hook-websockets-* packages","homepage":"https://github.com/lore/lore#readme","main":"lib/index.js","repository":{"type":"git","url":"git+https://github.com/lore/lore.git"},"bugs":{"url":"https://github.com/lore/lore/issues"},"scripts":{"build":"../../node_modules/.bin/babel src --out-dir lib","clean":"rimraf lib","debug":"mocha debug --compilers js:babel-core/register --recursive","prepublish":"npm run build","test":"mocha --compilers js:babel-core/register --recursive"},"dependencies":{"lodash":"^4.0.0"},"devDependencies":{"chai":"3.4.1","mocha":"2.3.4","rimraf":"2.5.2","sinon":"1.17.2"},"_id":"lore-websockets@0.12.0-rc.1","_shasum":"569cbef92be27d9b68a1e747e2c8beaa6b37c14a","_from":".","_npmVersion":"4.4.4","_nodeVersion":"6.6.0","_npmUser":{"name":"jchansen","email":"jason_hansen@outlook.com"},"dist":{"shasum":"569cbef92be27d9b68a1e747e2c8beaa6b37c14a","tarball":"https://registry.npmjs.org/lore-websockets/-/lore-websockets-0.12.0-rc.1.tgz","integrity":"sha512-eaZc9VIWo/z93jdFgm0QPyzyikwcu37aB958W8GfXCrPYx3UAlVOp3JMvZhcG/w4/hkWQRrxPTGF/QPEzh04GQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICET5bZZPWgZhkco1dgv4t9mcxmfnlCu1BcrD5AtT1tSAiAsVNDo+/1eF6iFW67Lu5EL/Ob3Ak/AyQsFiIZqE7iv+Q=="}]},"maintainers":[{"name":"jchansen","email":"jason_hansen@outlook.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/lore-websockets-0.12.0-rc.1.tgz_1493715341961_0.8883474159520119"},"directories":{}},"0.12.0":{"name":"lore-websockets","version":"0.12.0","license":"MIT","description":"Common code used by all lore-hook-websockets-* packages","homepage":"https://github.com/lore/lore#readme","main":"lib/index.js","repository":{"type":"git","url":"git+https://github.com/lore/lore.git"},"bugs":{"url":"https://github.com/lore/lore/issues"},"scripts":{"build":"../../node_modules/.bin/babel src --out-dir lib","clean":"rimraf lib","debug":"mocha debug --compilers js:babel-core/register --recursive","prepublish":"npm run build","test":"mocha --compilers js:babel-core/register --recursive"},"dependencies":{"lodash":"^4.0.0"},"devDependencies":{"chai":"3.4.1","mocha":"2.3.4","rimraf":"2.5.2","sinon":"1.17.2"},"_id":"lore-websockets@0.12.0","_shasum":"3cab710b06459ba2039da8da302273491c7e4928","_from":".","_npmVersion":"4.4.4","_nodeVersion":"6.6.0","_npmUser":{"name":"jchansen","email":"jason_hansen@outlook.com"},"dist":{"shasum":"3cab710b06459ba2039da8da302273491c7e4928","tarball":"https://registry.npmjs.org/lore-websockets/-/lore-websockets-0.12.0.tgz","integrity":"sha512-+/42/aXUD3KHhQMkA7JR79GS+sjpx9eC752xFe2d2N0fIp68daZRIwCogKxwydILvPrJQcPCfsrFnWI6zdX4ug==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDvNzpcIyulZvtJq1dz0Y64EYCiBFIZRjsC6BJ2xR+FAAiAaqsxifwTHnibjx+bOxCPIC2IvpQfH7SMbn1RS/r7l4Q=="}]},"maintainers":[{"name":"jchansen","email":"jason_hansen@outlook.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/lore-websockets-0.12.0.tgz_1494219606331_0.7052600502502173"},"directories":{}},"0.12.6":{"name":"lore-websockets","version":"0.12.6","license":"MIT","description":"Common code used by all lore-hook-websockets-* packages","homepage":"https://github.com/lore/lore#readme","main":"lib/index.js","repository":{"type":"git","url":"git+https://github.com/lore/lore.git"},"bugs":{"url":"https://github.com/lore/lore/issues"},"scripts":{"build":"../../node_modules/.bin/babel src --out-dir lib","clean":"rimraf lib","debug":"mocha debug --compilers js:babel-core/register --recursive","prepublish":"npm run build","test":"mocha --compilers js:babel-core/register --recursive"},"dependencies":{"lodash":"^4.0.0"},"devDependencies":{"chai":"3.4.1","mocha":"2.3.4","rimraf":"2.5.2","sinon":"1.17.2"},"_id":"lore-websockets@0.12.6","_npmVersion":"5.0.4","_nodeVersion":"6.11.0","_npmUser":{"name":"jchansen","email":"jason_hansen@outlook.com"},"dist":{"integrity":"sha512-gZEiK6gOmkMv7hcJR2ul2oMLz2sElF8b/C6PQYjF3vPuxOtjZr1z05pQ8fIbYWFBAeAY1I/XV3XoOm/j4ybPxg==","shasum":"513c26fb48f080c8c3e4f36a253e67876449ab85","tarball":"https://registry.npmjs.org/lore-websockets/-/lore-websockets-0.12.6.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDxNRwsQY69UVXe+8MZoTENhGokyU64iuuqxk2D97AW4AiB1wZolIf6yEBaWWPWlqUvAhqH0o4z2EEU91N5FBJFGmw=="}]},"maintainers":[{"name":"jchansen","email":"jason_hansen@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lore-websockets-0.12.6.tgz_1499144966163_0.059795684879645705"},"directories":{}},"0.12.7-rc.1":{"name":"lore-websockets","version":"0.12.7-rc.1","license":"MIT","description":"Common code used by all lore-hook-websockets-* packages","homepage":"https://github.com/lore/lore#readme","main":"lib/index.js","module":"es/index.js","repository":{"type":"git","url":"git+https://github.com/lore/lore.git"},"bugs":{"url":"https://github.com/lore/lore/issues"},"scripts":{"build":"npm run build:cjs && npm run build:es","build:cjs":"BABEL_ENV=cjs ../../node_modules/.bin/babel src --out-dir lib","build:es":"BABEL_ENV=es ../../node_modules/.bin/babel src --out-dir es","clean":"rimraf lib && rimraf es","debug":"mocha debug --compilers js:babel-core/register --recursive","prepublish":"npm run build","test":"BABEL_ENV=test mocha --compilers js:babel-core/register --recursive"},"dependencies":{"lodash":"^4.0.0"},"devDependencies":{"chai":"3.4.1","mocha":"2.3.4","rimraf":"2.5.2","sinon":"1.17.2"},"_id":"lore-websockets@0.12.7-rc.1","_npmVersion":"5.1.0","_nodeVersion":"6.11.0","_npmUser":{"name":"jchansen","email":"jason_hansen@outlook.com"},"dist":{"integrity":"sha512-WXp7iyBEWpJkQW+PVTgh6m4K5EH6rx6tax32VxGOplAS+ozvU8bokl3rFzQM6xIWK2laxUVsoCgRJ/O967k4oA==","shasum":"f4b473078c5fee7c5b3140f56467e4d54c88535e","tarball":"https://registry.npmjs.org/lore-websockets/-/lore-websockets-0.12.7-rc.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCCV8ExRTLEBEOMVszTr9bGt6u7ZPV+SQoniX70ugi3twIhAPvMPrL6NWsgaxyM6vm7l0FvyObujYKwMsBQc5YK40U+"}]},"maintainers":[{"name":"jchansen","email":"jason_hansen@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lore-websockets-0.12.7-rc.1.tgz_1499638561508_0.5115255590062588"},"directories":{}},"0.13.0-beta.1":{"name":"lore-websockets","version":"0.13.0-beta.1","license":"MIT","description":"Common code used by all lore-hook-websockets-* packages","homepage":"https://github.com/lore/lore#readme","main":"lib/index.js","repository":{"type":"git","url":"git+https://github.com/lore/lore.git"},"bugs":{"url":"https://github.com/lore/lore/issues"},"scripts":{"build":"npm run build:cjs && npm run build:es","build:cjs":"BABEL_ENV=cjs ../../node_modules/.bin/babel src --out-dir lib","build:es":"BABEL_ENV=es ../../node_modules/.bin/babel src --out-dir es","clean":"rimraf lib && rimraf es","debug":"mocha debug --compilers js:babel-core/register --recursive","lint":"../../node_modules/.bin/eslint src","prepublish":"npm run build","test":"BABEL_ENV=test mocha --compilers js:babel-core/register --recursive"},"dependencies":{"lodash":"^4.0.0"},"devDependencies":{"chai":"3.4.1","mocha":"2.3.4","rimraf":"2.5.2","sinon":"1.17.2"},"_id":"lore-websockets@0.13.0-beta.1","_npmVersion":"5.4.2","_nodeVersion":"8.5.0","_npmUser":{"name":"jchansen","email":"jason_hansen@outlook.com"},"dist":{"integrity":"sha512-wgLXTPanMhYKFj8wTiyd8QXcs3wXw8Qo9RiqH8BMOkkL/bembFqwaTNh5sKa2m3iy1lQwsJaokgoDcuaqtz2cA==","shasum":"2c2b33bbd3f0ca8ca2c7f59f8ddee6715f60e93a","tarball":"https://registry.npmjs.org/lore-websockets/-/lore-websockets-0.13.0-beta.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGbkrhTGZsuwJ2keFEC2iUv97v/cfve/EZYxjZIRgnryAiEAscs2EizaAOXJBu9TfU1wjmxVtLDh+6r6GNqbqgAi//8="}]},"maintainers":[{"name":"jchansen","email":"jason_hansen@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lore-websockets-0.13.0-beta.1.tgz_1505764637519_0.7495953417383134"},"directories":{}},"0.13.0-beta.3":{"name":"lore-websockets","version":"0.13.0-beta.3","license":"MIT","description":"Common code used by all lore-hook-websockets-* packages","homepage":"https://github.com/lore/lore#readme","main":"lib/index.js","module":"es/index.js","repository":{"type":"git","url":"git+https://github.com/lore/lore.git"},"bugs":{"url":"https://github.com/lore/lore/issues"},"scripts":{"build":"npm run build:cjs && npm run build:es","build:cjs":"BABEL_ENV=cjs ../../node_modules/.bin/babel src --out-dir lib","build:es":"BABEL_ENV=es ../../node_modules/.bin/babel src --out-dir es","clean":"rimraf lib && rimraf es","debug":"mocha debug --compilers js:babel-core/register --recursive","lint":"../../node_modules/.bin/eslint src","prepublish":"npm run build","test":"BABEL_ENV=test mocha --compilers js:babel-core/register --recursive"},"dependencies":{"lodash":"^4.0.0"},"devDependencies":{"chai":"3.4.1","mocha":"2.3.4","rimraf":"2.5.2","sinon":"1.17.2"},"_id":"lore-websockets@0.13.0-beta.3","_npmVersion":"5.4.2","_nodeVersion":"8.5.0","_npmUser":{"name":"jchansen","email":"jason_hansen@outlook.com"},"dist":{"integrity":"sha512-N+qYITmdE9DDkzi84zi/IXp1MJvERf8fDTV34DVfQU1KKAhxuRnb9LyUc1NFR8jahg9MH5o/4sR9MQSazsEkfA==","shasum":"90fd8d5dff6415dd8b1d36ab2df154250a0bb0cf","tarball":"https://registry.npmjs.org/lore-websockets/-/lore-websockets-0.13.0-beta.3.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB2j/t78vFkmP7Cakc7QJFSTMNX75ZRdM/Www5TpAJBMAiA2oQBesZf2TDc9rPVrT8RPPhtI2jbz7BW4CacZdfLAtg=="}]},"maintainers":[{"name":"jchansen","email":"jason_hansen@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lore-websockets-0.13.0-beta.3.tgz_1505773901638_0.1118066655471921"},"directories":{}},"0.13.0-beta.5":{"name":"lore-websockets","version":"0.13.0-beta.5","license":"MIT","description":"Common code used by all lore-hook-websockets-* packages","homepage":"https://github.com/lore/lore#readme","main":"lib/index.js","module":"es/index.js","repository":{"type":"git","url":"git+https://github.com/lore/lore.git"},"bugs":{"url":"https://github.com/lore/lore/issues"},"scripts":{"build":"npm run build:cjs && npm run build:es","build:cjs":"BABEL_ENV=cjs ../../node_modules/.bin/babel src --out-dir lib","build:es":"BABEL_ENV=es ../../node_modules/.bin/babel src --out-dir es","clean":"rimraf lib && rimraf es","debug":"mocha debug --compilers js:babel-core/register --recursive","lint":"../../node_modules/.bin/eslint src","prepublish":"npm run build","test":"BABEL_ENV=test mocha --compilers js:babel-core/register --recursive"},"dependencies":{"lodash":"^4.0.0"},"devDependencies":{"chai":"3.4.1","mocha":"2.3.4","rimraf":"2.5.2","sinon":"1.17.2"},"_id":"lore-websockets@0.13.0-beta.5","_npmVersion":"5.4.2","_nodeVersion":"8.6.0","_npmUser":{"name":"jchansen","email":"jason_hansen@outlook.com"},"dist":{"integrity":"sha512-dBtNzTXhivZ0PAiSshBPANgTOARcC3xYOSEbQt3xj5VRgeI70fFFlXPGZYDPNggTjW8yT+YF/hygQkVgOoy9aQ==","shasum":"eb2b6fef84ebd1d829f9d0a99c9148535a90287f","tarball":"https://registry.npmjs.org/lore-websockets/-/lore-websockets-0.13.0-beta.5.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDTbnReGZse0Kq86OPcwMmGW6iBm0fyTTbhlKJaoGsdAAiEA6EwVmSwyLV5WsCccCjhI7NXRJpgQLm+XuJW7b2170JU="}]},"maintainers":[{"name":"jchansen","email":"jason_hansen@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lore-websockets-0.13.0-beta.5.tgz_1510692766331_0.8556669496465474"},"directories":{}},"0.13.0-beta.6":{"name":"lore-websockets","version":"0.13.0-beta.6","license":"MIT","description":"Common code used by all lore-hook-websockets-* packages","homepage":"https://github.com/lore/lore#readme","main":"lib/index.js","module":"es/index.js","repository":{"type":"git","url":"git+https://github.com/lore/lore.git"},"bugs":{"url":"https://github.com/lore/lore/issues"},"scripts":{"build":"npm run build:cjs && npm run build:es","build:cjs":"BABEL_ENV=cjs ../../node_modules/.bin/babel src --out-dir lib","build:es":"BABEL_ENV=es ../../node_modules/.bin/babel src --out-dir es","clean":"rimraf lib && rimraf es","debug":"mocha debug --compilers js:babel-core/register --recursive","lint":"../../node_modules/.bin/eslint src","prepublish":"npm run build","test":"BABEL_ENV=test mocha --compilers js:babel-core/register --recursive"},"dependencies":{"lodash":"^4.0.0"},"devDependencies":{"chai":"3.4.1","mocha":"2.3.4","rimraf":"2.5.2","sinon":"1.17.2"},"_id":"lore-websockets@0.13.0-beta.6","_npmVersion":"5.4.2","_nodeVersion":"8.6.0","_npmUser":{"name":"jchansen","email":"jason_hansen@outlook.com"},"dist":{"integrity":"sha512-iGcRwhDpYaGEjwz4718KldHAuPL339ciry753XT2ddoXJjdsoHNaYr0/yPB2aCKVp1wRB6kNPEjlUTYdFI7S6g==","shasum":"6f6615dab927a7b8543d6c5b804ccdbd23aa8715","tarball":"https://registry.npmjs.org/lore-websockets/-/lore-websockets-0.13.0-beta.6.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCa3IJVzYLIW2/aihjZB0Jd/AgY10f9IWBzNcOccLMayQIgDtwSK+e28ERPsliL/Z+Lcvxy3IGBbI3cL7HgPvlKW1Y="}]},"maintainers":[{"name":"jchansen","email":"jason_hansen@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lore-websockets-0.13.0-beta.6.tgz_1510698372551_0.38692269707098603"},"directories":{}},"0.13.0-beta.7":{"name":"lore-websockets","version":"0.13.0-beta.7","license":"MIT","description":"Common code used by all lore-hook-websockets-* packages","homepage":"https://github.com/lore/lore#readme","main":"lib/index.js","module":"es/index.js","repository":{"type":"git","url":"git+https://github.com/lore/lore.git"},"bugs":{"url":"https://github.com/lore/lore/issues"},"scripts":{"build":"npm run build:cjs && npm run build:es","build:cjs":"BABEL_ENV=cjs ../../node_modules/.bin/babel src --out-dir lib","build:es":"BABEL_ENV=es ../../node_modules/.bin/babel src --out-dir es","clean":"rimraf lib && rimraf es","debug":"mocha debug --compilers js:babel-core/register --recursive","lint":"../../node_modules/.bin/eslint src","prepublish":"npm run build","test":"BABEL_ENV=test mocha --compilers js:babel-core/register --recursive"},"dependencies":{"lodash":"^4.0.0"},"devDependencies":{"chai":"3.4.1","mocha":"2.3.4","rimraf":"2.5.2","sinon":"1.17.2"},"_id":"lore-websockets@0.13.0-beta.7","_npmVersion":"5.4.2","_nodeVersion":"8.6.0","_npmUser":{"name":"jchansen","email":"jason_hansen@outlook.com"},"dist":{"integrity":"sha512-OsBa3oRiITFs8RAz4lMuCkQK9k8NUWFu/lU4M3LDxfVRwXV7fHoIwiPJTo6zabOM5FIhwwE+7gcypghPVgJkJg==","shasum":"442b530faae8b157715b308454531cd78193a03d","tarball":"https://registry.npmjs.org/lore-websockets/-/lore-websockets-0.13.0-beta.7.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDMCTNF8OZDii1hqU/JyUsX4CG7cr0FxHJMQd1kzD42ugIhAJbzwAr3daHmOaOerxRET8IqvkKWBvw/7dskR5zZYjKD"}]},"maintainers":[{"name":"jchansen","email":"jason_hansen@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lore-websockets-0.13.0-beta.7.tgz_1510699121315_0.24841967946849763"},"directories":{}},"0.13.0-beta.9":{"name":"lore-websockets","version":"0.13.0-beta.9","license":"MIT","description":"Common code used by all lore-hook-websockets-* packages","homepage":"https://github.com/lore/lore#readme","main":"lib/index.js","module":"es/index.js","repository":{"type":"git","url":"git+https://github.com/lore/lore.git"},"bugs":{"url":"https://github.com/lore/lore/issues"},"scripts":{"build":"npm run build:cjs && npm run build:es","build:cjs":"BABEL_ENV=cjs ../../node_modules/.bin/babel src --out-dir lib","build:es":"BABEL_ENV=es ../../node_modules/.bin/babel src --out-dir es","clean":"rimraf lib && rimraf es","debug":"mocha debug --compilers js:babel-core/register --recursive","lint":"../../node_modules/.bin/eslint src","prepublish":"npm run build","test":"BABEL_ENV=test mocha --compilers js:babel-core/register --recursive"},"dependencies":{"lodash":"^4.0.0"},"devDependencies":{"chai":"3.4.1","mocha":"2.3.4","rimraf":"2.5.2","sinon":"1.17.2"},"_id":"lore-websockets@0.13.0-beta.9","_npmVersion":"5.5.1","_nodeVersion":"8.9.1","_npmUser":{"name":"jchansen","email":"jason_hansen@outlook.com"},"dist":{"integrity":"sha512-jRQccV1rRoTrs1ApPbkRZ9VhL1WR/Q1lBP86yfec2Z7EJMhHC9JXeP9pil59WRZO+dKEgQFKW/NwZUtci3MUvQ==","shasum":"eb7fae3a0c9a909265b716c5ca4cdf7c4be49ec1","tarball":"https://registry.npmjs.org/lore-websockets/-/lore-websockets-0.13.0-beta.9.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDq38+203mj/YRFLduy+HW0BLj3qfJWq+GUukPH10SlygIgKl5jU+K1lllpl0xyGC6JDeu/hnpHmPPOKBjvhmXl3ws="}]},"maintainers":[{"name":"jchansen","email":"jason_hansen@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lore-websockets-0.13.0-beta.9.tgz_1511594301997_0.8373104173224419"},"directories":{}},"0.13.0-beta.10":{"name":"lore-websockets","version":"0.13.0-beta.10","license":"MIT","description":"Common code used by all lore-hook-websockets-* packages","homepage":"https://github.com/lore/lore#readme","main":"lib/index.js","module":"es/index.js","repository":{"type":"git","url":"git+https://github.com/lore/lore.git"},"bugs":{"url":"https://github.com/lore/lore/issues"},"scripts":{"build":"npm run build:cjs && npm run build:es","build:cjs":"BABEL_ENV=cjs ../../node_modules/.bin/babel src --out-dir lib","build:es":"BABEL_ENV=es ../../node_modules/.bin/babel src --out-dir es","clean":"rimraf lib && rimraf es","debug":"mocha debug --compilers js:babel-core/register --recursive","lint":"../../node_modules/.bin/eslint src","prepublish":"npm run build","test":"BABEL_ENV=test mocha --compilers js:babel-core/register --recursive"},"dependencies":{"lodash":"^4.0.0"},"devDependencies":{"chai":"3.4.1","mocha":"2.3.4","rimraf":"2.5.2","sinon":"1.17.2"},"_id":"lore-websockets@0.13.0-beta.10","_npmVersion":"5.5.1","_nodeVersion":"8.9.1","_npmUser":{"name":"jchansen","email":"jason_hansen@outlook.com"},"dist":{"integrity":"sha512-VL2xxX1PEuOoVRkrt6MEr0D7RNU6H8qBo/EZoN9NcA1gz89EADHd0F72yB5hVnVZ1ZnQQWfyiBW/T4CNhQcTKg==","shasum":"5d83cb6f8df162e4a39b4a5223e153954d03f976","tarball":"https://registry.npmjs.org/lore-websockets/-/lore-websockets-0.13.0-beta.10.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCEotth5c2wI+yNFrJXexm7xIbiRMcX7qZzYbogJYBU6wIhAKmzXLWwdUDyvJb7qPn0MleTKq/sAQqwHxkAq4FkMt+J"}]},"maintainers":[{"name":"jchansen","email":"jason_hansen@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lore-websockets-0.13.0-beta.10.tgz_1513286411587_0.939955176319927"},"directories":{}},"0.13.0-beta.11":{"name":"lore-websockets","version":"0.13.0-beta.11","license":"MIT","description":"Common code used by all lore-hook-websockets-* packages","homepage":"https://github.com/lore/lore#readme","main":"lib/index.js","module":"es/index.js","repository":{"type":"git","url":"git+https://github.com/lore/lore.git"},"bugs":{"url":"https://github.com/lore/lore/issues"},"scripts":{"build":"npm run build:cjs && npm run build:es","build:cjs":"BABEL_ENV=cjs ../../node_modules/.bin/babel src --out-dir lib","build:es":"BABEL_ENV=es ../../node_modules/.bin/babel src --out-dir es","clean":"rimraf lib && rimraf es","debug":"mocha debug --compilers js:babel-core/register --recursive","lint":"../../node_modules/.bin/eslint src","prepublish":"npm run build","test":"BABEL_ENV=test mocha --compilers js:babel-core/register --recursive"},"dependencies":{"lodash":"^4.0.0"},"devDependencies":{"chai":"3.4.1","mocha":"2.3.4","rimraf":"2.5.2","sinon":"1.17.2"},"_id":"lore-websockets@0.13.0-beta.11","_npmVersion":"5.5.1","_nodeVersion":"8.9.1","_npmUser":{"name":"jchansen","email":"jason_hansen@outlook.com"},"dist":{"integrity":"sha512-2kG1nPb7gu1Jop02G2Pea6/T/VdUdHSW1DoMrL10QmUIcwEls5zuuzvh3qhfw5nnKGMj4hGthtbqmuR+xLg8tA==","shasum":"95aa1f579ad58e9eefae33d26d93c43355858416","tarball":"https://registry.npmjs.org/lore-websockets/-/lore-websockets-0.13.0-beta.11.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCTXmqG5Af+zvdDEulj9en0A1+CeoxFr3w1cK6L0xCyrgIgNUzszIZiUoUxAOcpSXXyPVfNEyQUFvXYAtZyN+8GsKs="}]},"maintainers":[{"name":"jchansen","email":"jason_hansen@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lore-websockets-0.13.0-beta.11.tgz_1513716336013_0.8490201027598232"},"directories":{}},"0.13.0-beta.12":{"name":"lore-websockets","version":"0.13.0-beta.12","license":"MIT","description":"Common code used by all lore-hook-websockets-* packages","homepage":"https://github.com/lore/lore#readme","main":"lib/index.js","module":"es/index.js","repository":{"type":"git","url":"git+https://github.com/lore/lore.git"},"bugs":{"url":"https://github.com/lore/lore/issues"},"scripts":{"build":"npm run build:cjs && npm run build:es","build:cjs":"BABEL_ENV=cjs ../../node_modules/.bin/babel src --out-dir lib","build:es":"BABEL_ENV=es ../../node_modules/.bin/babel src --out-dir es","clean":"rimraf lib && rimraf es","debug":"mocha debug --compilers js:babel-core/register --recursive","lint":"../../node_modules/.bin/eslint src","prepublish":"npm run build","test":"BABEL_ENV=test mocha --compilers js:babel-core/register --recursive"},"dependencies":{"lodash":"^4.0.0"},"devDependencies":{"chai":"3.4.1","mocha":"2.3.4","rimraf":"2.5.2","sinon":"1.17.2"},"readme":"# lore-websockets\n\nThis library defines the interface for WebSockets used in Lore and has two main concepts; a `WebSocketConnection` class \nresponsible for connected to the server and listening for events, and a set of `dispatchers` responsible for converting \na websocket message into an action the Redux reducers understand what to do with.\n\n### Dispatchers\n\nEach `dispatcher` is a curry function that takes the redux store as the argument for the first function, and a \nwebsocket message as the argument for the second function. Here's an example dispatcher that converts a message \nabout a new Post resource being created into an action understood by the Redux store:\n\n``` js\n// dispatchers/create.js\nfunction (store) {\n  return function (message) {\n    var post = new Post(message.data);\n    store.dispatch({\n      type: ActionTypes.ADD_POST,\n      payload: payload(post, PayloadStates.RESOLVED)\n    });\n  }\n}\n```\n### Default Message Structure\n\nWhile the interface can adapt to any type of message emitted by the server, it assumes a default structure with a \n`verb` field broadcasting the type of change (created, updated, or deleted) and a `data` field containing the data \nabout that resource. Examples for each assumed default message type are below:\n\n``` js\n// for a resource that was just CREATED\n{\n  verb: 'created',\n  data: {\n    id: 1,\n    title: 'Some New Post'\n  }\n}\n```\n\n``` js\n// for a resource that was just UPDATED\n{\n  verb: 'updated',\n  data: {\n    id: 1,\n    title: 'Some Updated Post'\n  }\n}\n```\n\n``` js\n// for a resource that was just DESTROYED\n{\n  verb: 'destroyed',\n  data: {\n    id: 1,\n    title: 'Some Updated Post'\n  }\n}\n```\n### WebSocketConnection class\n\nNow that we've covered dispatchers and message structure, the last thing to cover for the interface is the process \nof connection to the server, listening for events, and then invoking the proper dispatcher to handle each event type.\n\nThe WebSocketConnection class looks like this:\n\n``` js\nvar WebSocketConnection = function(dispatchers, actions, options) {\n  this.dispatchers = dispatchers || {};\n  this.actions = actions || {};\n  this.options = options || {};\n  _.bindAll(this, _.functionsIn(this));\n  this.initialize.apply(this, arguments);\n};\n\n_.extend(WebSocketConnection.prototype, {\n\n  serverUrl: '',\n\n  initialize: function() {},\n\n  connect: function() {},\n\n  subscribe: function() {},\n\n  unsubscribe: function() {},\n\n  parse: function(message) {\n    return message;\n  },\n\n  dispatch: function(message) {\n    var parsedMessage = this.parse(message);\n    var verb = parsedMessage.verb;\n    var dispatcher = this.dispatchers[verb];\n\n    if (dispatcher) {\n      dispatcher(parsedMessage);\n    }\n  }\n\n});\n```\n\nWhen creating a websocket connection, it expects a set of dispatchers as an argument, which is an object of key/value \npairs where the key is the verb in the message (created, updated, etc.) and the value is the dispatcher function that\n has already been invoked with the store. So a set of dispatchers being provided would look like this:\n\n``` js\nvar dispatchers = {\n  created: createDispatcher(store) // returns a function that takes a message\n}\n```\n\nThe methods `initialize`, `connect`, `subscribe` and `unsubscribe` are left to be implemented by specific websocket \nimplementations (such as those for Sails, Socket.io and ActionCable).\n\nThe two methods that have a default implementation are `parse` and `dispatch`.\n#### parse: function(message)\n\nParse is a method that lets you transform the message from the server before a dispatcher converts it into an action. \nFor example, let's say that when a resource was created your server emitted a message structure that looked like this:\n\n``` js\n{\n  action: 'create',\n  result: {\n    id: 1,\n    title: 'Some New Post'\n  }\n}\n```\n\nWhile you don't _have_ to convert the message to the default assumed structure, doing so allows you to take advantage \nof the default dispatchers and `dispatch` implementation (otherwise you need to provide a custom implementation). So \nif you wanted to convert the above structure to the assumed one, your parse method would look like this:\n\n``` js\nparse: function(message) {\n  if(message.action === 'create') {\n    return {\n      verb: 'created',\n      data: message.result\n    }\n  }\n}\n```\n#### dispatch: function(message)\n\nThe Dispatch method is responsible for figuring out which dispatcher should handle the message, and then invoking \nthat dispatcher. The default implementation looks like this:\n\n``` js\ndispatch: function(message) {\n  var parsedMessage = this.parse(message);\n  var verb = parsedMessage.verb;\n  var dispatcher = this.dispatchers[verb];\n\n  if (dispatcher) {\n    dispatcher(parsedMessage);\n  }\n}\n```\n\nFirst the message is parsed, to make sure it has the expected structure. Then the verb is extracted, and (recalling \nthat the dispatchers are a key/value pair where the key is the verb) the verb is used to see if a matching dispatcher \nexists. If one does, it's invoked with the message, and will then convert it to an action that gets dispatched to the \nRedux store.\n","readmeFilename":"README.md","_id":"lore-websockets@0.13.0-beta.12","_npmVersion":"5.5.1","_nodeVersion":"8.9.1","_npmUser":{"name":"jchansen","email":"jason_hansen@outlook.com"},"dist":{"integrity":"sha512-PaXfCz3rBrEbL2ft2dqUsjDoKJw1rSOXdpxYUxLB1vsPzfvdxu3XR5ZF9OyUEUufRQe4DeUsyP4lkcTBuM6F3w==","shasum":"4694eadb72a841e1508ff482855f564adb849401","tarball":"https://registry.npmjs.org/lore-websockets/-/lore-websockets-0.13.0-beta.12.tgz","fileCount":30,"unpackedSize":29682,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICtXMCReJ2CqUaw6Ws4X1h9gP1repiI+DnGGNSnyXsZ4AiBOGnWGt+y8xcSzyD5517beA4BkSB4MTgsS0ZK9Hzn9KQ=="}]},"maintainers":[{"name":"jchansen","email":"jason_hansen@outlook.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lore-websockets_0.13.0-beta.12_1520214950789_0.3360941804513766"},"_hasShrinkwrap":false},"0.13.0-beta.13":{"name":"lore-websockets","version":"0.13.0-beta.13","license":"MIT","description":"Common code used by all lore-hook-websockets-* packages","homepage":"https://github.com/lore/lore#readme","main":"lib/index.js","module":"es/index.js","repository":{"type":"git","url":"git+https://github.com/lore/lore.git"},"bugs":{"url":"https://github.com/lore/lore/issues"},"scripts":{"build":"npm run build:cjs && npm run build:es","build:cjs":"BABEL_ENV=cjs ../../node_modules/.bin/babel src --out-dir lib","build:es":"BABEL_ENV=es ../../node_modules/.bin/babel src --out-dir es","clean":"rimraf lib && rimraf es","debug":"mocha debug --compilers js:babel-core/register --recursive","lint":"../../node_modules/.bin/eslint src","prepublish":"npm run build","test":"BABEL_ENV=test mocha --compilers js:babel-core/register --recursive"},"dependencies":{"lodash":"^4.0.0"},"devDependencies":{"chai":"3.4.1","mocha":"2.3.4","rimraf":"2.5.2","sinon":"1.17.2"},"readme":"# lore-websockets\n\nThis library defines the interface for WebSockets used in Lore and has two main concepts; a `WebSocketConnection` class \nresponsible for connected to the server and listening for events, and a set of `dispatchers` responsible for converting \na websocket message into an action the Redux reducers understand what to do with.\n\n### Dispatchers\n\nEach `dispatcher` is a curry function that takes the redux store as the argument for the first function, and a \nwebsocket message as the argument for the second function. Here's an example dispatcher that converts a message \nabout a new Post resource being created into an action understood by the Redux store:\n\n``` js\n// dispatchers/create.js\nfunction (store) {\n  return function (message) {\n    var post = new Post(message.data);\n    store.dispatch({\n      type: ActionTypes.ADD_POST,\n      payload: payload(post, PayloadStates.RESOLVED)\n    });\n  }\n}\n```\n### Default Message Structure\n\nWhile the interface can adapt to any type of message emitted by the server, it assumes a default structure with a \n`verb` field broadcasting the type of change (created, updated, or deleted) and a `data` field containing the data \nabout that resource. Examples for each assumed default message type are below:\n\n``` js\n// for a resource that was just CREATED\n{\n  verb: 'created',\n  data: {\n    id: 1,\n    title: 'Some New Post'\n  }\n}\n```\n\n``` js\n// for a resource that was just UPDATED\n{\n  verb: 'updated',\n  data: {\n    id: 1,\n    title: 'Some Updated Post'\n  }\n}\n```\n\n``` js\n// for a resource that was just DESTROYED\n{\n  verb: 'destroyed',\n  data: {\n    id: 1,\n    title: 'Some Updated Post'\n  }\n}\n```\n### WebSocketConnection class\n\nNow that we've covered dispatchers and message structure, the last thing to cover for the interface is the process \nof connection to the server, listening for events, and then invoking the proper dispatcher to handle each event type.\n\nThe WebSocketConnection class looks like this:\n\n``` js\nvar WebSocketConnection = function(dispatchers, actions, options) {\n  this.dispatchers = dispatchers || {};\n  this.actions = actions || {};\n  this.options = options || {};\n  _.bindAll(this, _.functionsIn(this));\n  this.initialize.apply(this, arguments);\n};\n\n_.extend(WebSocketConnection.prototype, {\n\n  serverUrl: '',\n\n  initialize: function() {},\n\n  connect: function() {},\n\n  subscribe: function() {},\n\n  unsubscribe: function() {},\n\n  parse: function(message) {\n    return message;\n  },\n\n  dispatch: function(message) {\n    var parsedMessage = this.parse(message);\n    var verb = parsedMessage.verb;\n    var dispatcher = this.dispatchers[verb];\n\n    if (dispatcher) {\n      dispatcher(parsedMessage);\n    }\n  }\n\n});\n```\n\nWhen creating a websocket connection, it expects a set of dispatchers as an argument, which is an object of key/value \npairs where the key is the verb in the message (created, updated, etc.) and the value is the dispatcher function that\n has already been invoked with the store. So a set of dispatchers being provided would look like this:\n\n``` js\nvar dispatchers = {\n  created: createDispatcher(store) // returns a function that takes a message\n}\n```\n\nThe methods `initialize`, `connect`, `subscribe` and `unsubscribe` are left to be implemented by specific websocket \nimplementations (such as those for Sails, Socket.io and ActionCable).\n\nThe two methods that have a default implementation are `parse` and `dispatch`.\n#### parse: function(message)\n\nParse is a method that lets you transform the message from the server before a dispatcher converts it into an action. \nFor example, let's say that when a resource was created your server emitted a message structure that looked like this:\n\n``` js\n{\n  action: 'create',\n  result: {\n    id: 1,\n    title: 'Some New Post'\n  }\n}\n```\n\nWhile you don't _have_ to convert the message to the default assumed structure, doing so allows you to take advantage \nof the default dispatchers and `dispatch` implementation (otherwise you need to provide a custom implementation). So \nif you wanted to convert the above structure to the assumed one, your parse method would look like this:\n\n``` js\nparse: function(message) {\n  if(message.action === 'create') {\n    return {\n      verb: 'created',\n      data: message.result\n    }\n  }\n}\n```\n#### dispatch: function(message)\n\nThe Dispatch method is responsible for figuring out which dispatcher should handle the message, and then invoking \nthat dispatcher. The default implementation looks like this:\n\n``` js\ndispatch: function(message) {\n  var parsedMessage = this.parse(message);\n  var verb = parsedMessage.verb;\n  var dispatcher = this.dispatchers[verb];\n\n  if (dispatcher) {\n    dispatcher(parsedMessage);\n  }\n}\n```\n\nFirst the message is parsed, to make sure it has the expected structure. Then the verb is extracted, and (recalling \nthat the dispatchers are a key/value pair where the key is the verb) the verb is used to see if a matching dispatcher \nexists. If one does, it's invoked with the message, and will then convert it to an action that gets dispatched to the \nRedux store.\n","readmeFilename":"README.md","_id":"lore-websockets@0.13.0-beta.13","_npmVersion":"5.5.1","_nodeVersion":"8.9.1","_npmUser":{"name":"jchansen","email":"jason_hansen@outlook.com"},"dist":{"integrity":"sha512-7ne3f32QETZZFEhKt4sp9EbISocObnFjBFuuofCRwKFFBpiSmXVM8QURUgz3QXkoVNHoebB24o1nsQ0rtBTC8w==","shasum":"a48c6b79038a35474b87d915152600db083101a6","tarball":"https://registry.npmjs.org/lore-websockets/-/lore-websockets-0.13.0-beta.13.tgz","fileCount":30,"unpackedSize":29682,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDDcHH+bdpZzmELuA9ZN/LJF052WUtWFD+wa9Fkbo+g0QIhAMt30w6QVBGJq1urpnYrN6CEZRpvNTA0CB1ty5cTA1WE"}]},"maintainers":[{"name":"jchansen","email":"jason_hansen@outlook.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lore-websockets_0.13.0-beta.13_1521939994274_0.7929032575011847"},"_hasShrinkwrap":false},"0.13.0-beta.14":{"name":"lore-websockets","version":"0.13.0-beta.14","license":"MIT","description":"Common code used by all lore-hook-websockets-* packages","homepage":"https://github.com/lore/lore#readme","main":"lib/index.js","module":"es/index.js","repository":{"type":"git","url":"git+https://github.com/lore/lore.git"},"bugs":{"url":"https://github.com/lore/lore/issues"},"scripts":{"build":"npm run build:cjs && npm run build:es","build:cjs":"BABEL_ENV=cjs ../../node_modules/.bin/babel src --out-dir lib","build:es":"BABEL_ENV=es ../../node_modules/.bin/babel src --out-dir es","clean":"rimraf lib && rimraf es","debug":"mocha debug --compilers js:babel-core/register --recursive","lint":"../../node_modules/.bin/eslint src","prepublish":"npm run build","test":"BABEL_ENV=test mocha --compilers js:babel-core/register --recursive"},"dependencies":{"lodash":"^4.0.0"},"devDependencies":{"chai":"3.4.1","mocha":"2.3.4","rimraf":"2.5.2","sinon":"1.17.2"},"readme":"# lore-websockets\n\nThis library defines the interface for WebSockets used in Lore and has two main concepts; a `WebSocketConnection` class \nresponsible for connected to the server and listening for events, and a set of `dispatchers` responsible for converting \na websocket message into an action the Redux reducers understand what to do with.\n\n### Dispatchers\n\nEach `dispatcher` is a curry function that takes the redux store as the argument for the first function, and a \nwebsocket message as the argument for the second function. Here's an example dispatcher that converts a message \nabout a new Post resource being created into an action understood by the Redux store:\n\n``` js\n// dispatchers/create.js\nfunction (store) {\n  return function (message) {\n    var post = new Post(message.data);\n    store.dispatch({\n      type: ActionTypes.ADD_POST,\n      payload: payload(post, PayloadStates.RESOLVED)\n    });\n  }\n}\n```\n### Default Message Structure\n\nWhile the interface can adapt to any type of message emitted by the server, it assumes a default structure with a \n`verb` field broadcasting the type of change (created, updated, or deleted) and a `data` field containing the data \nabout that resource. Examples for each assumed default message type are below:\n\n``` js\n// for a resource that was just CREATED\n{\n  verb: 'created',\n  data: {\n    id: 1,\n    title: 'Some New Post'\n  }\n}\n```\n\n``` js\n// for a resource that was just UPDATED\n{\n  verb: 'updated',\n  data: {\n    id: 1,\n    title: 'Some Updated Post'\n  }\n}\n```\n\n``` js\n// for a resource that was just DESTROYED\n{\n  verb: 'destroyed',\n  data: {\n    id: 1,\n    title: 'Some Updated Post'\n  }\n}\n```\n### WebSocketConnection class\n\nNow that we've covered dispatchers and message structure, the last thing to cover for the interface is the process \nof connection to the server, listening for events, and then invoking the proper dispatcher to handle each event type.\n\nThe WebSocketConnection class looks like this:\n\n``` js\nvar WebSocketConnection = function(dispatchers, actions, options) {\n  this.dispatchers = dispatchers || {};\n  this.actions = actions || {};\n  this.options = options || {};\n  _.bindAll(this, _.functionsIn(this));\n  this.initialize.apply(this, arguments);\n};\n\n_.extend(WebSocketConnection.prototype, {\n\n  serverUrl: '',\n\n  initialize: function() {},\n\n  connect: function() {},\n\n  subscribe: function() {},\n\n  unsubscribe: function() {},\n\n  parse: function(message) {\n    return message;\n  },\n\n  dispatch: function(message) {\n    var parsedMessage = this.parse(message);\n    var verb = parsedMessage.verb;\n    var dispatcher = this.dispatchers[verb];\n\n    if (dispatcher) {\n      dispatcher(parsedMessage);\n    }\n  }\n\n});\n```\n\nWhen creating a websocket connection, it expects a set of dispatchers as an argument, which is an object of key/value \npairs where the key is the verb in the message (created, updated, etc.) and the value is the dispatcher function that\n has already been invoked with the store. So a set of dispatchers being provided would look like this:\n\n``` js\nvar dispatchers = {\n  created: createDispatcher(store) // returns a function that takes a message\n}\n```\n\nThe methods `initialize`, `connect`, `subscribe` and `unsubscribe` are left to be implemented by specific websocket \nimplementations (such as those for Sails, Socket.io and ActionCable).\n\nThe two methods that have a default implementation are `parse` and `dispatch`.\n#### parse: function(message)\n\nParse is a method that lets you transform the message from the server before a dispatcher converts it into an action. \nFor example, let's say that when a resource was created your server emitted a message structure that looked like this:\n\n``` js\n{\n  action: 'create',\n  result: {\n    id: 1,\n    title: 'Some New Post'\n  }\n}\n```\n\nWhile you don't _have_ to convert the message to the default assumed structure, doing so allows you to take advantage \nof the default dispatchers and `dispatch` implementation (otherwise you need to provide a custom implementation). So \nif you wanted to convert the above structure to the assumed one, your parse method would look like this:\n\n``` js\nparse: function(message) {\n  if(message.action === 'create') {\n    return {\n      verb: 'created',\n      data: message.result\n    }\n  }\n}\n```\n#### dispatch: function(message)\n\nThe Dispatch method is responsible for figuring out which dispatcher should handle the message, and then invoking \nthat dispatcher. The default implementation looks like this:\n\n``` js\ndispatch: function(message) {\n  var parsedMessage = this.parse(message);\n  var verb = parsedMessage.verb;\n  var dispatcher = this.dispatchers[verb];\n\n  if (dispatcher) {\n    dispatcher(parsedMessage);\n  }\n}\n```\n\nFirst the message is parsed, to make sure it has the expected structure. Then the verb is extracted, and (recalling \nthat the dispatchers are a key/value pair where the key is the verb) the verb is used to see if a matching dispatcher \nexists. If one does, it's invoked with the message, and will then convert it to an action that gets dispatched to the \nRedux store.\n","readmeFilename":"README.md","_id":"lore-websockets@0.13.0-beta.14","_npmVersion":"5.5.1","_nodeVersion":"8.9.1","_npmUser":{"name":"jchansen","email":"jason_hansen@outlook.com"},"dist":{"integrity":"sha512-MpQFjTPWEdUcX7KAp0X3WR+g/k2ke+y6XGNV9N4WIJ0BCG555kxCceOIYep4FsI/bfnVYNp9WxQ8xecaiLzWlg==","shasum":"ae45522171b3060a2dc6547fc9fc58adb37ed01f","tarball":"https://registry.npmjs.org/lore-websockets/-/lore-websockets-0.13.0-beta.14.tgz","fileCount":30,"unpackedSize":29682,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCoS88tKmsjetCSkagRx6ocWUuddzA8uj2osWKFckMSLwIhAImuf0MAIh0vHcUpnyOnMytXoz7OqZm3QYxeM6SeGTac"}]},"maintainers":[{"name":"jchansen","email":"jason_hansen@outlook.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lore-websockets_0.13.0-beta.14_1522531102134_0.9110297054931396"},"_hasShrinkwrap":false},"0.13.0-beta.15":{"name":"lore-websockets","version":"0.13.0-beta.15","license":"MIT","description":"Common code used by all lore-hook-websockets-* packages","homepage":"https://github.com/lore/lore#readme","main":"lib/index.js","module":"es/index.js","repository":{"type":"git","url":"git+https://github.com/lore/lore.git"},"bugs":{"url":"https://github.com/lore/lore/issues"},"scripts":{"build":"npm run build:cjs && npm run build:es","build:cjs":"BABEL_ENV=cjs ../../node_modules/.bin/babel src --out-dir lib","build:es":"BABEL_ENV=es ../../node_modules/.bin/babel src --out-dir es","clean":"rimraf lib && rimraf es","debug":"mocha debug --compilers js:babel-core/register --recursive","lint":"../../node_modules/.bin/eslint src","prepublish":"npm run build","test":"BABEL_ENV=test mocha --compilers js:babel-core/register --recursive"},"dependencies":{"lodash":"^4.0.0"},"devDependencies":{"chai":"3.4.1","mocha":"2.3.4","rimraf":"2.5.2","sinon":"1.17.2"},"readme":"# lore-websockets\n\nThis library defines the interface for WebSockets used in Lore and has two main concepts; a `WebSocketConnection` class \nresponsible for connected to the server and listening for events, and a set of `dispatchers` responsible for converting \na websocket message into an action the Redux reducers understand what to do with.\n\n### Dispatchers\n\nEach `dispatcher` is a curry function that takes the redux store as the argument for the first function, and a \nwebsocket message as the argument for the second function. Here's an example dispatcher that converts a message \nabout a new Post resource being created into an action understood by the Redux store:\n\n``` js\n// dispatchers/create.js\nfunction (store) {\n  return function (message) {\n    var post = new Post(message.data);\n    store.dispatch({\n      type: ActionTypes.ADD_POST,\n      payload: payload(post, PayloadStates.RESOLVED)\n    });\n  }\n}\n```\n### Default Message Structure\n\nWhile the interface can adapt to any type of message emitted by the server, it assumes a default structure with a \n`verb` field broadcasting the type of change (created, updated, or deleted) and a `data` field containing the data \nabout that resource. Examples for each assumed default message type are below:\n\n``` js\n// for a resource that was just CREATED\n{\n  verb: 'created',\n  data: {\n    id: 1,\n    title: 'Some New Post'\n  }\n}\n```\n\n``` js\n// for a resource that was just UPDATED\n{\n  verb: 'updated',\n  data: {\n    id: 1,\n    title: 'Some Updated Post'\n  }\n}\n```\n\n``` js\n// for a resource that was just DESTROYED\n{\n  verb: 'destroyed',\n  data: {\n    id: 1,\n    title: 'Some Updated Post'\n  }\n}\n```\n### WebSocketConnection class\n\nNow that we've covered dispatchers and message structure, the last thing to cover for the interface is the process \nof connection to the server, listening for events, and then invoking the proper dispatcher to handle each event type.\n\nThe WebSocketConnection class looks like this:\n\n``` js\nvar WebSocketConnection = function(dispatchers, actions, options) {\n  this.dispatchers = dispatchers || {};\n  this.actions = actions || {};\n  this.options = options || {};\n  _.bindAll(this, _.functionsIn(this));\n  this.initialize.apply(this, arguments);\n};\n\n_.extend(WebSocketConnection.prototype, {\n\n  serverUrl: '',\n\n  initialize: function() {},\n\n  connect: function() {},\n\n  subscribe: function() {},\n\n  unsubscribe: function() {},\n\n  parse: function(message) {\n    return message;\n  },\n\n  dispatch: function(message) {\n    var parsedMessage = this.parse(message);\n    var verb = parsedMessage.verb;\n    var dispatcher = this.dispatchers[verb];\n\n    if (dispatcher) {\n      dispatcher(parsedMessage);\n    }\n  }\n\n});\n```\n\nWhen creating a websocket connection, it expects a set of dispatchers as an argument, which is an object of key/value \npairs where the key is the verb in the message (created, updated, etc.) and the value is the dispatcher function that\n has already been invoked with the store. So a set of dispatchers being provided would look like this:\n\n``` js\nvar dispatchers = {\n  created: createDispatcher(store) // returns a function that takes a message\n}\n```\n\nThe methods `initialize`, `connect`, `subscribe` and `unsubscribe` are left to be implemented by specific websocket \nimplementations (such as those for Sails, Socket.io and ActionCable).\n\nThe two methods that have a default implementation are `parse` and `dispatch`.\n#### parse: function(message)\n\nParse is a method that lets you transform the message from the server before a dispatcher converts it into an action. \nFor example, let's say that when a resource was created your server emitted a message structure that looked like this:\n\n``` js\n{\n  action: 'create',\n  result: {\n    id: 1,\n    title: 'Some New Post'\n  }\n}\n```\n\nWhile you don't _have_ to convert the message to the default assumed structure, doing so allows you to take advantage \nof the default dispatchers and `dispatch` implementation (otherwise you need to provide a custom implementation). So \nif you wanted to convert the above structure to the assumed one, your parse method would look like this:\n\n``` js\nparse: function(message) {\n  if(message.action === 'create') {\n    return {\n      verb: 'created',\n      data: message.result\n    }\n  }\n}\n```\n#### dispatch: function(message)\n\nThe Dispatch method is responsible for figuring out which dispatcher should handle the message, and then invoking \nthat dispatcher. The default implementation looks like this:\n\n``` js\ndispatch: function(message) {\n  var parsedMessage = this.parse(message);\n  var verb = parsedMessage.verb;\n  var dispatcher = this.dispatchers[verb];\n\n  if (dispatcher) {\n    dispatcher(parsedMessage);\n  }\n}\n```\n\nFirst the message is parsed, to make sure it has the expected structure. Then the verb is extracted, and (recalling \nthat the dispatchers are a key/value pair where the key is the verb) the verb is used to see if a matching dispatcher \nexists. If one does, it's invoked with the message, and will then convert it to an action that gets dispatched to the \nRedux store.\n","readmeFilename":"README.md","_id":"lore-websockets@0.13.0-beta.15","_npmVersion":"5.5.1","_nodeVersion":"8.9.1","_npmUser":{"name":"jchansen","email":"jason_hansen@outlook.com"},"dist":{"integrity":"sha512-LTXZ5RlADlRvo2yadgxH8pAxdzJJ+ruzeS2+qMmViwj8T/8IglCUi0S7VEy9hAlprpHdCNhoul7Tz6Wsl9jvuQ==","shasum":"ad53b2773a453d973b80484cb6c52621fe40a5f7","tarball":"https://registry.npmjs.org/lore-websockets/-/lore-websockets-0.13.0-beta.15.tgz","fileCount":30,"unpackedSize":29682,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH74CrxT0rRpbOJOorLhZjF/u/q+bbYLAT/JUgGhKh4kAiBa4GEX0ApOiwCemBgcdPWHPVNeoZjlShkrRgn2Ib1gsA=="}]},"maintainers":[{"name":"jchansen","email":"jason_hansen@outlook.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lore-websockets_0.13.0-beta.15_1523329162313_0.4760765037231205"},"_hasShrinkwrap":false},"0.13.0-beta.16":{"name":"lore-websockets","version":"0.13.0-beta.16","license":"MIT","description":"Common code used by all lore-hook-websockets-* packages","homepage":"https://github.com/lore/lore#readme","main":"lib/index.js","module":"es/index.js","repository":{"type":"git","url":"git+https://github.com/lore/lore.git"},"bugs":{"url":"https://github.com/lore/lore/issues"},"scripts":{"build":"npm run build:cjs && npm run build:es","build:cjs":"BABEL_ENV=cjs ../../node_modules/.bin/babel src --out-dir lib","build:es":"BABEL_ENV=es ../../node_modules/.bin/babel src --out-dir es","clean":"rimraf lib && rimraf es","debug":"mocha debug --compilers js:babel-core/register --recursive","lint":"../../node_modules/.bin/eslint src","prepublish":"npm run build","test":"BABEL_ENV=test mocha --compilers js:babel-core/register --recursive"},"dependencies":{"lodash":"^4.0.0"},"devDependencies":{"chai":"3.4.1","mocha":"2.3.4","rimraf":"2.5.2","sinon":"1.17.2"},"readme":"# lore-websockets\n\nThis library defines the interface for WebSockets used in Lore and has two main concepts; a `WebSocketConnection` class \nresponsible for connected to the server and listening for events, and a set of `dispatchers` responsible for converting \na websocket message into an action the Redux reducers understand what to do with.\n\n### Dispatchers\n\nEach `dispatcher` is a curry function that takes the redux store as the argument for the first function, and a \nwebsocket message as the argument for the second function. Here's an example dispatcher that converts a message \nabout a new Post resource being created into an action understood by the Redux store:\n\n``` js\n// dispatchers/create.js\nfunction (store) {\n  return function (message) {\n    var post = new Post(message.data);\n    store.dispatch({\n      type: ActionTypes.ADD_POST,\n      payload: payload(post, PayloadStates.RESOLVED)\n    });\n  }\n}\n```\n### Default Message Structure\n\nWhile the interface can adapt to any type of message emitted by the server, it assumes a default structure with a \n`verb` field broadcasting the type of change (created, updated, or deleted) and a `data` field containing the data \nabout that resource. Examples for each assumed default message type are below:\n\n``` js\n// for a resource that was just CREATED\n{\n  verb: 'created',\n  data: {\n    id: 1,\n    title: 'Some New Post'\n  }\n}\n```\n\n``` js\n// for a resource that was just UPDATED\n{\n  verb: 'updated',\n  data: {\n    id: 1,\n    title: 'Some Updated Post'\n  }\n}\n```\n\n``` js\n// for a resource that was just DESTROYED\n{\n  verb: 'destroyed',\n  data: {\n    id: 1,\n    title: 'Some Updated Post'\n  }\n}\n```\n### WebSocketConnection class\n\nNow that we've covered dispatchers and message structure, the last thing to cover for the interface is the process \nof connection to the server, listening for events, and then invoking the proper dispatcher to handle each event type.\n\nThe WebSocketConnection class looks like this:\n\n``` js\nvar WebSocketConnection = function(dispatchers, actions, options) {\n  this.dispatchers = dispatchers || {};\n  this.actions = actions || {};\n  this.options = options || {};\n  _.bindAll(this, _.functionsIn(this));\n  this.initialize.apply(this, arguments);\n};\n\n_.extend(WebSocketConnection.prototype, {\n\n  serverUrl: '',\n\n  initialize: function() {},\n\n  connect: function() {},\n\n  subscribe: function() {},\n\n  unsubscribe: function() {},\n\n  parse: function(message) {\n    return message;\n  },\n\n  dispatch: function(message) {\n    var parsedMessage = this.parse(message);\n    var verb = parsedMessage.verb;\n    var dispatcher = this.dispatchers[verb];\n\n    if (dispatcher) {\n      dispatcher(parsedMessage);\n    }\n  }\n\n});\n```\n\nWhen creating a websocket connection, it expects a set of dispatchers as an argument, which is an object of key/value \npairs where the key is the verb in the message (created, updated, etc.) and the value is the dispatcher function that\n has already been invoked with the store. So a set of dispatchers being provided would look like this:\n\n``` js\nvar dispatchers = {\n  created: createDispatcher(store) // returns a function that takes a message\n}\n```\n\nThe methods `initialize`, `connect`, `subscribe` and `unsubscribe` are left to be implemented by specific websocket \nimplementations (such as those for Sails, Socket.io and ActionCable).\n\nThe two methods that have a default implementation are `parse` and `dispatch`.\n#### parse: function(message)\n\nParse is a method that lets you transform the message from the server before a dispatcher converts it into an action. \nFor example, let's say that when a resource was created your server emitted a message structure that looked like this:\n\n``` js\n{\n  action: 'create',\n  result: {\n    id: 1,\n    title: 'Some New Post'\n  }\n}\n```\n\nWhile you don't _have_ to convert the message to the default assumed structure, doing so allows you to take advantage \nof the default dispatchers and `dispatch` implementation (otherwise you need to provide a custom implementation). So \nif you wanted to convert the above structure to the assumed one, your parse method would look like this:\n\n``` js\nparse: function(message) {\n  if(message.action === 'create') {\n    return {\n      verb: 'created',\n      data: message.result\n    }\n  }\n}\n```\n#### dispatch: function(message)\n\nThe Dispatch method is responsible for figuring out which dispatcher should handle the message, and then invoking \nthat dispatcher. The default implementation looks like this:\n\n``` js\ndispatch: function(message) {\n  var parsedMessage = this.parse(message);\n  var verb = parsedMessage.verb;\n  var dispatcher = this.dispatchers[verb];\n\n  if (dispatcher) {\n    dispatcher(parsedMessage);\n  }\n}\n```\n\nFirst the message is parsed, to make sure it has the expected structure. Then the verb is extracted, and (recalling \nthat the dispatchers are a key/value pair where the key is the verb) the verb is used to see if a matching dispatcher \nexists. If one does, it's invoked with the message, and will then convert it to an action that gets dispatched to the \nRedux store.\n","readmeFilename":"README.md","_id":"lore-websockets@0.13.0-beta.16","_npmVersion":"5.5.1","_nodeVersion":"8.9.1","_npmUser":{"name":"jchansen","email":"jason_hansen@outlook.com"},"dist":{"integrity":"sha512-GbQ9U8FfUShks5aX60/9N+twabq3I97jP1r9mRAJz+PCN0i/7GUPJetjeyDJe3eqQ/jWvrh2Iaqu782SqGgMwA==","shasum":"02b18de74ed5fcc8ae259c26117a199004e52ea6","tarball":"https://registry.npmjs.org/lore-websockets/-/lore-websockets-0.13.0-beta.16.tgz","fileCount":30,"unpackedSize":29682,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa4kKQCRA9TVsSAnZWagAAssMP/1YLiq9w3VZ+vS0oubRs\n2yn4gvl1BxWkObS0ZTJzZu3xL/UTd/+A7F+5Hx9vDPaoExKHrhllglwqfcmx\nj+8WP1fXdxAAzuiqJEU750hTghdLL3NojPgtEZ/RUQNzL4aUScDoSsLOkwKI\nMTVGhR6f4q7heeimDEE5HfXWCFF9d2GF9TRch4GV9iEExfCehrlBJxM60SvY\nuz0u7H17PUu+/SFd5NeWjru4zIz4h45VH23uaj+tNKsS+Dz3JxD8itl593/Z\nT9JXYqpgaMQ+QQpBB9MMRnQAN4QYqTfCeaOwTe8MHF38YqWZgEDn2vB+n+5w\nEV8l4Jwn+gal8BDjR8B06Eg5EMxcZXR2x3gjFKJrcadPZiHLoknsSF2aKXAP\nmrF3xhTn57pWm0mhR2cUkUIj5W5mbla5FMxwsw3hfpBg5KkStO5X6bL7l718\naR+Hw4ewPGcjUWK/oqmE4Era3Ciininu9OZd3gxw8R5a8QTifRei7QvqnoKe\noJXjAnX5+OdppzdV+7iQV1YOHQo+DfvAOp3fwXjY4AgKVdEa6rqrY/OmPxm7\nfVlNjQwXPdhS4q89u4yWZip6pAo6VJbKHQIh6xj3W3j/TwXUeugIeZvNU5x3\nnRlckJ5XCcwkclalcUBhmxJtXq46h9qMyOv113E87DI4O6sHqmUMBqPFRJDG\n4zuB\r\n=cOr4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCcUBB3S/cmwYH7l+JifyRk2dbTXbABQC4I7OU+u04CCAIhAOdWqhY8dZ0/cDMyc+HFL3Y82uGcCXX5DuvuS7pqIQme"}]},"maintainers":[{"name":"jchansen","email":"jason_hansen@outlook.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lore-websockets_0.13.0-beta.16_1524777616057_0.5907512805941173"},"_hasShrinkwrap":false},"0.13.0-rc.1":{"name":"lore-websockets","version":"0.13.0-rc.1","license":"MIT","description":"Common code used by all lore-hook-websockets-* packages","homepage":"https://github.com/lore/lore#readme","main":"lib/index.js","module":"es/index.js","repository":{"type":"git","url":"git+https://github.com/lore/lore.git"},"bugs":{"url":"https://github.com/lore/lore/issues"},"scripts":{"build":"npm run build:cjs && npm run build:es","build:cjs":"BABEL_ENV=cjs ../../node_modules/.bin/babel src --out-dir lib","build:es":"BABEL_ENV=es ../../node_modules/.bin/babel src --out-dir es","clean":"rimraf lib && rimraf es","debug":"mocha debug --compilers js:babel-core/register --recursive","lint":"../../node_modules/.bin/eslint src","prepublish":"npm run build","test":"BABEL_ENV=test mocha --compilers js:babel-core/register --recursive"},"dependencies":{"lodash":"^4.0.0","lore-utils":"^0.13.0-rc.1"},"devDependencies":{"chai":"3.4.1","mocha":"2.3.4","rimraf":"2.5.2","sinon":"1.17.2"},"readme":"# lore-websockets\n\nThis library defines the interface for WebSockets used in Lore and has two main concepts; a `WebSocketConnection` class \nresponsible for connected to the server and listening for events, and a set of `dispatchers` responsible for converting \na websocket message into an action the Redux reducers understand what to do with.\n\n### Dispatchers\n\nEach `dispatcher` is a curry function that takes the redux store as the argument for the first function, and a \nwebsocket message as the argument for the second function. Here's an example dispatcher that converts a message \nabout a new Post resource being created into an action understood by the Redux store:\n\n``` js\n// dispatchers/create.js\nfunction (store) {\n  return function (message) {\n    var post = new Post(message.data);\n    store.dispatch({\n      type: ActionTypes.ADD_POST,\n      payload: payload(post, PayloadStates.RESOLVED)\n    });\n  }\n}\n```\n### Default Message Structure\n\nWhile the interface can adapt to any type of message emitted by the server, it assumes a default structure with a \n`verb` field broadcasting the type of change (created, updated, or deleted) and a `data` field containing the data \nabout that resource. Examples for each assumed default message type are below:\n\n``` js\n// for a resource that was just CREATED\n{\n  verb: 'created',\n  data: {\n    id: 1,\n    title: 'Some New Post'\n  }\n}\n```\n\n``` js\n// for a resource that was just UPDATED\n{\n  verb: 'updated',\n  data: {\n    id: 1,\n    title: 'Some Updated Post'\n  }\n}\n```\n\n``` js\n// for a resource that was just DESTROYED\n{\n  verb: 'destroyed',\n  data: {\n    id: 1,\n    title: 'Some Updated Post'\n  }\n}\n```\n### WebSocketConnection class\n\nNow that we've covered dispatchers and message structure, the last thing to cover for the interface is the process \nof connection to the server, listening for events, and then invoking the proper dispatcher to handle each event type.\n\nThe WebSocketConnection class looks like this:\n\n``` js\nvar WebSocketConnection = function(dispatchers, actions, options) {\n  this.dispatchers = dispatchers || {};\n  this.actions = actions || {};\n  this.options = options || {};\n  _.bindAll(this, _.functionsIn(this));\n  this.initialize.apply(this, arguments);\n};\n\n_.extend(WebSocketConnection.prototype, {\n\n  serverUrl: '',\n\n  initialize: function() {},\n\n  connect: function() {},\n\n  subscribe: function() {},\n\n  unsubscribe: function() {},\n\n  parse: function(message) {\n    return message;\n  },\n\n  dispatch: function(message) {\n    var parsedMessage = this.parse(message);\n    var verb = parsedMessage.verb;\n    var dispatcher = this.dispatchers[verb];\n\n    if (dispatcher) {\n      dispatcher(parsedMessage);\n    }\n  }\n\n});\n```\n\nWhen creating a websocket connection, it expects a set of dispatchers as an argument, which is an object of key/value \npairs where the key is the verb in the message (created, updated, etc.) and the value is the dispatcher function that\n has already been invoked with the store. So a set of dispatchers being provided would look like this:\n\n``` js\nvar dispatchers = {\n  created: createDispatcher(store) // returns a function that takes a message\n}\n```\n\nThe methods `initialize`, `connect`, `subscribe` and `unsubscribe` are left to be implemented by specific websocket \nimplementations (such as those for Sails, Socket.io and ActionCable).\n\nThe two methods that have a default implementation are `parse` and `dispatch`.\n#### parse: function(message)\n\nParse is a method that lets you transform the message from the server before a dispatcher converts it into an action. \nFor example, let's say that when a resource was created your server emitted a message structure that looked like this:\n\n``` js\n{\n  action: 'create',\n  result: {\n    id: 1,\n    title: 'Some New Post'\n  }\n}\n```\n\nWhile you don't _have_ to convert the message to the default assumed structure, doing so allows you to take advantage \nof the default dispatchers and `dispatch` implementation (otherwise you need to provide a custom implementation). So \nif you wanted to convert the above structure to the assumed one, your parse method would look like this:\n\n``` js\nparse: function(message) {\n  if(message.action === 'create') {\n    return {\n      verb: 'created',\n      data: message.result\n    }\n  }\n}\n```\n#### dispatch: function(message)\n\nThe Dispatch method is responsible for figuring out which dispatcher should handle the message, and then invoking \nthat dispatcher. The default implementation looks like this:\n\n``` js\ndispatch: function(message) {\n  var parsedMessage = this.parse(message);\n  var verb = parsedMessage.verb;\n  var dispatcher = this.dispatchers[verb];\n\n  if (dispatcher) {\n    dispatcher(parsedMessage);\n  }\n}\n```\n\nFirst the message is parsed, to make sure it has the expected structure. Then the verb is extracted, and (recalling \nthat the dispatchers are a key/value pair where the key is the verb) the verb is used to see if a matching dispatcher \nexists. If one does, it's invoked with the message, and will then convert it to an action that gets dispatched to the \nRedux store.\n","readmeFilename":"README.md","_id":"lore-websockets@0.13.0-rc.1","_npmVersion":"6.0.1","_nodeVersion":"8.11.1","_npmUser":{"name":"jchansen","email":"jason_hansen@outlook.com"},"dist":{"integrity":"sha512-7/PI4G4nynh+dYHSXXMFA3Y4BPepTJZ6sorZzamuU01/gP/JgzQ23fqLtjJGZXZuAqSHRTdC+CAouGg14q8eDg==","shasum":"393147aec18dc90f5d7e5ace7aa1f70153bf4ed3","tarball":"https://registry.npmjs.org/lore-websockets/-/lore-websockets-0.13.0-rc.1.tgz","fileCount":27,"unpackedSize":26372,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa+IcrCRA9TVsSAnZWagAAntMP/2e6ywuQ36a9WHNGjOOF\n1KoEIFhQ31+fDhCB26AXP3ULyOxgptK0Bcq7nqNDTUKcT6rRQ1YQ8HKx+S3p\ndM/6flpsc2F2ftYk0ZjFX8k2eRU8c36xj5nzZFPdNZ3U3Cv3ImTukJU/HcUk\nZEzVOhmF4Dwd7xGxNr087223Pryisw1Fo46go3c6dRUj4xHHVN+cpBi3gxwv\nLxvozlsGq07LJJpGg4aOOLd7srHyEH49Ko4KxbnP0ghKmMSMPBt9OWYmyFSr\n6RYLic+zL7dBcKM9itHTTneyl8BAPyyCF3qJk2LFOILs+oWa7GlpzjE296Ik\nfvPVkiTTDPpfAyEdRgXsNVpvCsr7eFmag8YXGondkv+cIKz/WzokGF3A/QOa\ny7bYuP9bsuJNsV9tE53crToXVs+0236OObx2X7MujBSqtQoxLMO9ZOhNJQOk\nV9r1EH4NA/BdcLYY9K/XN89F7372Adz/M7Hu+GDKKVbyJdaHCn/ERkynqGr4\nwOPtgkwzULPv+Jz8cDz/UGzN9m8Qpt6mHt2V+KISnKLHlQOiJhXT6boiY6Up\nCvcjTL8O1URJnoyR2N7ck+6GGMri2SWXlIV6JD6aQ6s+vlRcTQ3nyfTZkHRj\nTirBw4/7nqYGe05puMEsT+4qW4cKWsOeOjbDUOYYPat+QQTAEwE3i2i0xvz1\n8Y53\r\n=5VoB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICPyAOy/of2zHiiq7olFtAnC7E4Nbqm9rms8Mn6sZEqhAiEAvIJvC6HNX5kw6TCRf1leqrTUNzMFP8MbcPe1qwcGGf8="}]},"maintainers":[{"name":"jchansen","email":"jason_hansen@outlook.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lore-websockets_0.13.0-rc.1_1526236970127_0.18597459112424386"},"_hasShrinkwrap":false},"0.13.0-rc.2":{"name":"lore-websockets","version":"0.13.0-rc.2","license":"MIT","description":"Common code used by all lore-hook-websockets-* packages","homepage":"https://github.com/lore/lore#readme","main":"lib/index.js","module":"es/index.js","repository":{"type":"git","url":"git+https://github.com/lore/lore.git"},"bugs":{"url":"https://github.com/lore/lore/issues"},"scripts":{"build":"npm run build:cjs && npm run build:es","build:cjs":"BABEL_ENV=cjs ../../node_modules/.bin/babel src --out-dir lib","build:es":"BABEL_ENV=es ../../node_modules/.bin/babel src --out-dir es","clean":"rimraf lib && rimraf es","debug":"mocha debug --compilers js:babel-core/register --recursive","lint":"../../node_modules/.bin/eslint src","prepublish":"npm run build","test":"BABEL_ENV=test mocha --compilers js:babel-core/register --recursive"},"dependencies":{"lodash":"^4.0.0","lore-utils":"^0.13.0-rc.2"},"devDependencies":{"chai":"3.4.1","mocha":"2.3.4","rimraf":"2.5.2","sinon":"1.17.2"},"readme":"# lore-websockets\n\nThis library defines the interface for WebSockets used in Lore and has two main concepts; a `WebSocketConnection` class \nresponsible for connected to the server and listening for events, and a set of `dispatchers` responsible for converting \na websocket message into an action the Redux reducers understand what to do with.\n\n### Dispatchers\n\nEach `dispatcher` is a curry function that takes the redux store as the argument for the first function, and a \nwebsocket message as the argument for the second function. Here's an example dispatcher that converts a message \nabout a new Post resource being created into an action understood by the Redux store:\n\n``` js\n// dispatchers/create.js\nfunction (store) {\n  return function (message) {\n    var post = new Post(message.data);\n    store.dispatch({\n      type: ActionTypes.ADD_POST,\n      payload: payload(post, PayloadStates.RESOLVED)\n    });\n  }\n}\n```\n### Default Message Structure\n\nWhile the interface can adapt to any type of message emitted by the server, it assumes a default structure with a \n`verb` field broadcasting the type of change (created, updated, or deleted) and a `data` field containing the data \nabout that resource. Examples for each assumed default message type are below:\n\n``` js\n// for a resource that was just CREATED\n{\n  verb: 'created',\n  data: {\n    id: 1,\n    title: 'Some New Post'\n  }\n}\n```\n\n``` js\n// for a resource that was just UPDATED\n{\n  verb: 'updated',\n  data: {\n    id: 1,\n    title: 'Some Updated Post'\n  }\n}\n```\n\n``` js\n// for a resource that was just DESTROYED\n{\n  verb: 'destroyed',\n  data: {\n    id: 1,\n    title: 'Some Updated Post'\n  }\n}\n```\n### WebSocketConnection class\n\nNow that we've covered dispatchers and message structure, the last thing to cover for the interface is the process \nof connection to the server, listening for events, and then invoking the proper dispatcher to handle each event type.\n\nThe WebSocketConnection class looks like this:\n\n``` js\nvar WebSocketConnection = function(dispatchers, actions, options) {\n  this.dispatchers = dispatchers || {};\n  this.actions = actions || {};\n  this.options = options || {};\n  _.bindAll(this, _.functionsIn(this));\n  this.initialize.apply(this, arguments);\n};\n\n_.extend(WebSocketConnection.prototype, {\n\n  serverUrl: '',\n\n  initialize: function() {},\n\n  connect: function() {},\n\n  subscribe: function() {},\n\n  unsubscribe: function() {},\n\n  parse: function(message) {\n    return message;\n  },\n\n  dispatch: function(message) {\n    var parsedMessage = this.parse(message);\n    var verb = parsedMessage.verb;\n    var dispatcher = this.dispatchers[verb];\n\n    if (dispatcher) {\n      dispatcher(parsedMessage);\n    }\n  }\n\n});\n```\n\nWhen creating a websocket connection, it expects a set of dispatchers as an argument, which is an object of key/value \npairs where the key is the verb in the message (created, updated, etc.) and the value is the dispatcher function that\n has already been invoked with the store. So a set of dispatchers being provided would look like this:\n\n``` js\nvar dispatchers = {\n  created: createDispatcher(store) // returns a function that takes a message\n}\n```\n\nThe methods `initialize`, `connect`, `subscribe` and `unsubscribe` are left to be implemented by specific websocket \nimplementations (such as those for Sails, Socket.io and ActionCable).\n\nThe two methods that have a default implementation are `parse` and `dispatch`.\n#### parse: function(message)\n\nParse is a method that lets you transform the message from the server before a dispatcher converts it into an action. \nFor example, let's say that when a resource was created your server emitted a message structure that looked like this:\n\n``` js\n{\n  action: 'create',\n  result: {\n    id: 1,\n    title: 'Some New Post'\n  }\n}\n```\n\nWhile you don't _have_ to convert the message to the default assumed structure, doing so allows you to take advantage \nof the default dispatchers and `dispatch` implementation (otherwise you need to provide a custom implementation). So \nif you wanted to convert the above structure to the assumed one, your parse method would look like this:\n\n``` js\nparse: function(message) {\n  if(message.action === 'create') {\n    return {\n      verb: 'created',\n      data: message.result\n    }\n  }\n}\n```\n#### dispatch: function(message)\n\nThe Dispatch method is responsible for figuring out which dispatcher should handle the message, and then invoking \nthat dispatcher. The default implementation looks like this:\n\n``` js\ndispatch: function(message) {\n  var parsedMessage = this.parse(message);\n  var verb = parsedMessage.verb;\n  var dispatcher = this.dispatchers[verb];\n\n  if (dispatcher) {\n    dispatcher(parsedMessage);\n  }\n}\n```\n\nFirst the message is parsed, to make sure it has the expected structure. Then the verb is extracted, and (recalling \nthat the dispatchers are a key/value pair where the key is the verb) the verb is used to see if a matching dispatcher \nexists. If one does, it's invoked with the message, and will then convert it to an action that gets dispatched to the \nRedux store.\n","readmeFilename":"README.md","_id":"lore-websockets@0.13.0-rc.2","_npmVersion":"6.0.1","_nodeVersion":"8.11.1","_npmUser":{"name":"jchansen","email":"jason_hansen@outlook.com"},"dist":{"integrity":"sha512-gAiREC6wBkMr9RKpMmCiKmzKOn7I5xXeqkZT1EllnCz7bfRjCgiFkKYDefTnxkBzPHLKOcWd83rg7tSdeRImkQ==","shasum":"0bc430c330dec46991e3767336bdd0859e261ca9","tarball":"https://registry.npmjs.org/lore-websockets/-/lore-websockets-0.13.0-rc.2.tgz","fileCount":21,"unpackedSize":22403,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbAhMXCRA9TVsSAnZWagAAPlkP/jKLXCjwpRly9JsWaqYT\n+hGXk4+WVoXv3b8hkSLjb5wfPg2VIBAyhc+aH6vZU2uaWeYAJGOlmL9E6j2W\nYBqby3YrFbNfG+eWH7O7I46fHp5Rowas3SYoDbBQ4g8Y9ZUXxe2QnwUbiR6J\nSmal3tuzp4RbsX9WqjjS1KxaQZvo975Sc+S9O3xf7KMNHN9tSFRC4LLJwb/g\nvvQgwCJLhSGGAgssaSocKh6Wv16fPQyxMJg1tYXj7dtbJhClGisFBDHe2kry\nxujJv0WcqFOAr3lxS8ia45zkVMOzfm0AMqzc4xcO2Wz6KWgDbE+RyzGEeYlz\njEef6nlfVPg5X0K8e8+PUfh4URemHhY7WTWDPsp3g7ll/vWUhN6isZjEAdb6\nQhtgNp1b0BEVCFV6zCeKkfe1FXCH/zQzVEgnaO6xahnMSjqoFvNWQjOFNbde\nJxAA/hm9+TvVObdhuuAiHmnqfRxz2XklqCKT7Vf9c9wGK5pEqAIyQT1Gqhwv\nsdg8V+uurjjO4Vd2x3gNspPLqOEJKFPfMFC40CJWG8pUeXEixhgy+W4vGUXI\nQ3qc22cuehWKG88ZbT4zrCzBx4ORlYLGHn/HyAxd3U0gnVdkYjeo4USIXDVC\nZRLzEsKxNaZkqenwUNAZhhkwNcxm8oxCm3XyeFHzUxQ7ceGKs2jU5QDpAhQY\nxNaN\r\n=o1nf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC37xZ/ASdF26Wlyz5W1uZaUQ2JOjycZc7zixGuHanMkwIgOHPXu+XvOOiPgLLtoSqJ8MJcABINImQRrGbawojATSg="}]},"maintainers":[{"name":"jchansen","email":"jason_hansen@outlook.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lore-websockets_0.13.0-rc.2_1526862615195_0.9908465331891565"},"_hasShrinkwrap":false},"0.13.0":{"name":"lore-websockets","version":"0.13.0","license":"MIT","description":"Common code used by all lore-hook-websockets-* packages","homepage":"https://github.com/lore/lore#readme","main":"lib/index.js","module":"es/index.js","repository":{"type":"git","url":"git+https://github.com/lore/lore.git"},"bugs":{"url":"https://github.com/lore/lore/issues"},"scripts":{"build":"npm run build:cjs && npm run build:es","build:cjs":"BABEL_ENV=cjs ../../node_modules/.bin/babel src --out-dir lib","build:es":"BABEL_ENV=es ../../node_modules/.bin/babel src --out-dir es","clean":"rimraf lib && rimraf es","debug":"mocha debug --compilers js:babel-core/register --recursive","lint":"../../node_modules/.bin/eslint src","prepublish":"npm run build","test":"BABEL_ENV=test mocha --compilers js:babel-core/register --recursive"},"dependencies":{"lodash":"^4.0.0","lore-utils":"^0.13.0"},"devDependencies":{"chai":"3.4.1","mocha":"2.3.4","rimraf":"2.5.2","sinon":"1.17.2"},"_id":"lore-websockets@0.13.0","_npmVersion":"6.0.1","_nodeVersion":"8.11.1","_npmUser":{"name":"jchansen","email":"jason_hansen@outlook.com"},"dist":{"integrity":"sha512-0QiJP9s812PdQkt3GpIz1BQrK8YlSmLhv0tfAEgQ5BMX+GO0VafZ3GKMXQHtYYJzWl+kc8ssp/L4ltAp6TV/Bg==","shasum":"2ddafb70ece7ce459a3353fbab2271e0504237fa","tarball":"https://registry.npmjs.org/lore-websockets/-/lore-websockets-0.13.0.tgz","fileCount":21,"unpackedSize":22393,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbLvkRCRA9TVsSAnZWagAAyQgP/RF3DHDmhfeI6GtzS0uf\npS/Y5Fr5moCQMAvzHj+NpO2+2iiGbL2JxQoHp8jhTFG23LtAZI6cZk/Q1MkC\nW/QhcQ+WDz1j2HLkqinlOU8HTBfJhIKFuj1q2TnUEAOBC6BJ+cGoW4C/w8Ur\nF7XbudZfMi2BS7Rgrad7gyeBiE1zrmz6ksktCmreig3eTZHTt1t4nLc/Co2I\nmnaMIdH7CPmsSWh693+5D0wFohJpRRQz6rrKaIHeJOcB3O40PxF1oH7UEJlf\noBDaOQ5r6qU+OYRD/ghf5yF3Np/S3zGVpUMRk7O+MT5u09cv9rRwyHFJRU6U\nT56zyYwLbPhe7PVxJrsFyXyBLfO0RxtzhOgWxD2F/JIZyQYGTgsl5nXASgp0\n22V1r5PJhNqrQx2ocI+4a0QP+1bADue45DI0/qejhJ3Cd8qk1bizewvbqH15\nwdupQbEn9rKDgUjEX30YEpfaaUEgsobgfYCHActWrMwhkAGJ9eiuAk+9Zw4S\nQjp+Vtkf6cq6RXZkpP3yYroYgpqaUnWwYVyopNutkouYaY2IsJ7QsT9Ilemd\n56V5Oi55vsZKOYl9sbo6Rlhdq8c4UalTcoUHMVBsqX4zSnlW0WgS3XzE1ERB\nDutIz6nt/RMOEz0aTFPDSh8kfKsSsmiBqEhSDEcpDF4bCqK7IB7kKY8Stnx5\nF/CR\r\n=NwQN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHep+j8Owyd5gNHI2pL4ZCnZDAfL48vD5n7yqM10b47hAiAatAYDU9i/kwGZLRxqGcdvlQxvX2BXGW5jzalg6VP1UQ=="}]},"maintainers":[{"name":"jchansen","email":"jason_hansen@outlook.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lore-websockets_0.13.0_1529805073870_0.26804009455670563"},"_hasShrinkwrap":false}},"readme":"# lore-websockets\n\nThis library defines the interface for WebSockets used in Lore and has two main concepts; a `WebSocketConnection` class \nresponsible for connected to the server and listening for events, and a set of `dispatchers` responsible for converting \na websocket message into an action the Redux reducers understand what to do with.\n\n### Dispatchers\n\nEach `dispatcher` is a curry function that takes the redux store as the argument for the first function, and a \nwebsocket message as the argument for the second function. Here's an example dispatcher that converts a message \nabout a new Post resource being created into an action understood by the Redux store:\n\n``` js\n// dispatchers/create.js\nfunction (store) {\n  return function (message) {\n    var post = new Post(message.data);\n    store.dispatch({\n      type: ActionTypes.ADD_POST,\n      payload: payload(post, PayloadStates.RESOLVED)\n    });\n  }\n}\n```\n### Default Message Structure\n\nWhile the interface can adapt to any type of message emitted by the server, it assumes a default structure with a \n`verb` field broadcasting the type of change (created, updated, or deleted) and a `data` field containing the data \nabout that resource. Examples for each assumed default message type are below:\n\n``` js\n// for a resource that was just CREATED\n{\n  verb: 'created',\n  data: {\n    id: 1,\n    title: 'Some New Post'\n  }\n}\n```\n\n``` js\n// for a resource that was just UPDATED\n{\n  verb: 'updated',\n  data: {\n    id: 1,\n    title: 'Some Updated Post'\n  }\n}\n```\n\n``` js\n// for a resource that was just DESTROYED\n{\n  verb: 'destroyed',\n  data: {\n    id: 1,\n    title: 'Some Updated Post'\n  }\n}\n```\n### WebSocketConnection class\n\nNow that we've covered dispatchers and message structure, the last thing to cover for the interface is the process \nof connection to the server, listening for events, and then invoking the proper dispatcher to handle each event type.\n\nThe WebSocketConnection class looks like this:\n\n``` js\nvar WebSocketConnection = function(dispatchers, actions, options) {\n  this.dispatchers = dispatchers || {};\n  this.actions = actions || {};\n  this.options = options || {};\n  _.bindAll(this, _.functionsIn(this));\n  this.initialize.apply(this, arguments);\n};\n\n_.extend(WebSocketConnection.prototype, {\n\n  serverUrl: '',\n\n  initialize: function() {},\n\n  connect: function() {},\n\n  subscribe: function() {},\n\n  unsubscribe: function() {},\n\n  parse: function(message) {\n    return message;\n  },\n\n  dispatch: function(message) {\n    var parsedMessage = this.parse(message);\n    var verb = parsedMessage.verb;\n    var dispatcher = this.dispatchers[verb];\n\n    if (dispatcher) {\n      dispatcher(parsedMessage);\n    }\n  }\n\n});\n```\n\nWhen creating a websocket connection, it expects a set of dispatchers as an argument, which is an object of key/value \npairs where the key is the verb in the message (created, updated, etc.) and the value is the dispatcher function that\n has already been invoked with the store. So a set of dispatchers being provided would look like this:\n\n``` js\nvar dispatchers = {\n  created: createDispatcher(store) // returns a function that takes a message\n}\n```\n\nThe methods `initialize`, `connect`, `subscribe` and `unsubscribe` are left to be implemented by specific websocket \nimplementations (such as those for Sails, Socket.io and ActionCable).\n\nThe two methods that have a default implementation are `parse` and `dispatch`.\n#### parse: function(message)\n\nParse is a method that lets you transform the message from the server before a dispatcher converts it into an action. \nFor example, let's say that when a resource was created your server emitted a message structure that looked like this:\n\n``` js\n{\n  action: 'create',\n  result: {\n    id: 1,\n    title: 'Some New Post'\n  }\n}\n```\n\nWhile you don't _have_ to convert the message to the default assumed structure, doing so allows you to take advantage \nof the default dispatchers and `dispatch` implementation (otherwise you need to provide a custom implementation). So \nif you wanted to convert the above structure to the assumed one, your parse method would look like this:\n\n``` js\nparse: function(message) {\n  if(message.action === 'create') {\n    return {\n      verb: 'created',\n      data: message.result\n    }\n  }\n}\n```\n#### dispatch: function(message)\n\nThe Dispatch method is responsible for figuring out which dispatcher should handle the message, and then invoking \nthat dispatcher. The default implementation looks like this:\n\n``` js\ndispatch: function(message) {\n  var parsedMessage = this.parse(message);\n  var verb = parsedMessage.verb;\n  var dispatcher = this.dispatchers[verb];\n\n  if (dispatcher) {\n    dispatcher(parsedMessage);\n  }\n}\n```\n\nFirst the message is parsed, to make sure it has the expected structure. Then the verb is extracted, and (recalling \nthat the dispatchers are a key/value pair where the key is the verb) the verb is used to see if a matching dispatcher \nexists. If one does, it's invoked with the message, and will then convert it to an action that gets dispatched to the \nRedux store.\n","maintainers":[{"name":"jchansen","email":"jason_hansen@outlook.com"}],"time":{"modified":"2022-06-19T14:20:25.525Z","created":"2016-09-09T21:01:54.607Z","0.9.0-rc.1":"2016-09-09T21:01:54.607Z","0.9.0":"2016-09-11T08:32:47.412Z","0.10.0-beta.1":"2016-10-04T09:22:13.740Z","0.10.0":"2016-10-13T05:43:35.150Z","0.11.0-beta.1":"2016-12-12T06:24:40.826Z","0.11.0-rc.1":"2017-01-24T06:25:27.467Z","0.11.0":"2017-01-29T04:55:27.491Z","0.12.0-beta.1":"2017-03-05T23:59:36.118Z","0.11.5":"2017-05-02T08:06:06.841Z","0.12.0-rc.1":"2017-05-02T08:55:42.191Z","0.12.0":"2017-05-08T05:00:06.576Z","0.12.6":"2017-07-04T05:09:26.291Z","0.12.7-rc.1":"2017-07-09T22:16:01.702Z","0.13.0-beta.1":"2017-09-18T19:57:20.481Z","0.13.0-beta.3":"2017-09-18T22:31:41.725Z","0.13.0-beta.5":"2017-11-14T20:52:46.425Z","0.13.0-beta.6":"2017-11-14T22:26:12.612Z","0.13.0-beta.7":"2017-11-14T22:38:41.498Z","0.13.0-beta.9":"2017-11-25T07:18:22.150Z","0.13.0-beta.10":"2017-12-14T21:20:11.645Z","0.13.0-beta.11":"2017-12-19T20:45:36.433Z","0.13.0-beta.12":"2018-03-05T01:55:50.842Z","0.13.0-beta.13":"2018-03-25T01:06:34.419Z","0.13.0-beta.14":"2018-03-31T21:18:22.182Z","0.13.0-beta.15":"2018-04-10T02:59:22.384Z","0.13.0-beta.16":"2018-04-26T21:20:16.165Z","0.13.0-rc.1":"2018-05-13T18:42:50.216Z","0.13.0-rc.2":"2018-05-21T00:30:15.257Z","0.13.0":"2018-06-24T01:51:13.928Z"},"homepage":"https://github.com/lore/lore#readme","repository":{"type":"git","url":"git+https://github.com/lore/lore.git"},"bugs":{"url":"https://github.com/lore/lore/issues"},"license":"MIT","readmeFilename":"README.md"}