{"_id":"losin","_rev":"38-4de5d9c7b301840b76d2b28e3241fba8","name":"losin","description":"Request-response and validation capabilities for nossock (& other)","dist-tags":{"latest":"0.0.21"},"versions":{"0.0.1":{"name":"losin","version":"0.0.1","author":{"name":"Yaroslav Pogrebnyak","email":"yyyaroslav@gmail.com","url":"http://pogrebnyak.info"},"homepage":"http://github.com/yyyar/losin","repository":{"type":"git","url":"git@github.com:yyyar/losin.git"},"bugs":{"url":"https://github.com/yyyar/losin/issues"},"license":"MIT","engines":{"node":">= 0.10.12"},"keywords":["protocol","rpc","request-response","validation"],"scripts":{"test":"nodeunit tests --reporter verbose"},"main":"./lib/index.js","dependencies":{"jayschema":"^0.2.7","lodash":"^2.4.1","shortid":"^2.0.1"},"devDependencies":{"nossock":"0.0.10"},"description":"[![Build Status](https://travis-ci.org/yyyar/losin.svg?branch=master)](https://travis-ci.org/yyyar/losin) [![NPM version](https://badge.fury.io/js/losin.svg)](http://badge.fury.io/js/losin)","_id":"losin@0.0.1","dist":{"shasum":"5f06bc59e05a3eb1b175b589a3c00fd55e3cf821","tarball":"https://registry.npmjs.org/losin/-/losin-0.0.1.tgz","integrity":"sha512-ZZ+6zQEdt4k68CKXPf5MYx5sD+FmDscFqVEcbZM0kAgjp439aJMZXxTkuGSqwWuzSiWsFZNrQXzh7jGAoXk8ZQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEBGEdvlAQQpYQCPg11Tbc9grmyysZeaKgCMH16FrcdOAiEAsgosXqe/7KfO1uLgIThDPVqDjK8SO6GhCEE5OuTp4CE="}]},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"yyyar","email":"yyyaroslav@gmail.com"},"maintainers":[{"name":"yyyar","email":"yyyaroslav@gmail.com"}]},"0.0.2":{"name":"losin","version":"0.0.2","description":"Request-response and validation capabilities for nossock (& other)","author":{"name":"Yaroslav Pogrebnyak","email":"yyyaroslav@gmail.com","url":"http://pogrebnyak.info"},"homepage":"http://github.com/yyyar/losin","repository":{"type":"git","url":"git@github.com:yyyar/losin.git"},"bugs":{"url":"https://github.com/yyyar/losin/issues"},"license":"MIT","engines":{"node":">= 0.10.12"},"keywords":["protocol","rpc","request-response","validation"],"scripts":{"test":"nodeunit tests --reporter verbose"},"main":"./lib/index.js","dependencies":{"jayschema":"^0.2.7","lodash":"^2.4.1","shortid":"^2.0.1"},"devDependencies":{"nossock":"0.0.10"},"_id":"losin@0.0.2","dist":{"shasum":"5e23f7c3f428e1d76fbe6bfe0dae1944fc61cc58","tarball":"https://registry.npmjs.org/losin/-/losin-0.0.2.tgz","integrity":"sha512-SqFToXNMvIRfCbf1wXN3c+soiX84E9i+fpWh09DOGFYDa4AN3D/ZEs13X9Ndq4a1bwZkdNkyLSUQH6DGdOMmVQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDSIBp6MNeIIOZn9vVTjjv2ntOglEPrs1X06GTXXjrPSAiA6vG1sTt5SRVROQC1Dia2vU6zSWQFl83F0RNVgrCJ50Q=="}]},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"yyyar","email":"yyyaroslav@gmail.com"},"maintainers":[{"name":"yyyar","email":"yyyaroslav@gmail.com"}]},"0.0.3":{"name":"losin","version":"0.0.3","description":"Request-response and validation capabilities for nossock (& other)","author":{"name":"Yaroslav Pogrebnyak","email":"yyyaroslav@gmail.com","url":"http://pogrebnyak.info"},"homepage":"http://github.com/yyyar/losin","repository":{"type":"git","url":"git@github.com:yyyar/losin.git"},"bugs":{"url":"https://github.com/yyyar/losin/issues"},"license":"MIT","engines":{"node":">= 0.10.12"},"keywords":["protocol","rpc","request-response","validation"],"scripts":{"test":"nodeunit tests --reporter verbose"},"main":"./lib/index.js","dependencies":{"jayschema":"^0.2.7","lodash":"^2.4.1","shortid":"^2.0.1","wrench":"^1.5.8"},"devDependencies":{"nossock":"0.0.10"},"_id":"losin@0.0.3","dist":{"shasum":"2094cd453fa5b783a518acc661661e17aad28a1d","tarball":"https://registry.npmjs.org/losin/-/losin-0.0.3.tgz","integrity":"sha512-ZIp+/A5svyoQDUHIgEztwX3ZtqVrSujmhwtUx8JgOQvD4xMNAx0yhSClIA6fCvzIrInuCjWFq0/zYQSn9Vbm/g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDIdS/RgBa5Ii+t2MZSyLV35dIWqwoP5rCw8MsJ6Rf1cwIgF1UJDaeLH+1KUJRfwA0BqSieosCf1PX6nyYKk7SG5PU="}]},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"yyyar","email":"yyyaroslav@gmail.com"},"maintainers":[{"name":"yyyar","email":"yyyaroslav@gmail.com"}]},"0.0.4":{"name":"losin","version":"0.0.4","description":"Request-response and validation capabilities for nossock (& other)","author":{"name":"Yaroslav Pogrebnyak","email":"yyyaroslav@gmail.com","url":"http://pogrebnyak.info"},"homepage":"http://github.com/yyyar/losin","repository":{"type":"git","url":"git@github.com:yyyar/losin.git"},"bugs":{"url":"https://github.com/yyyar/losin/issues"},"license":"MIT","engines":{"node":">= 0.10.12"},"keywords":["protocol","rpc","request-response","validation"],"scripts":{"test":"nodeunit tests --reporter verbose"},"main":"./lib/index.js","dependencies":{"jayschema":"^0.2.7","lodash":"^2.4.1","shortid":"^2.0.1","wrench":"^1.5.8"},"devDependencies":{"nossock":"0.0.10"},"_id":"losin@0.0.4","dist":{"shasum":"80ecc36f700251978651edcc822680a9492d2568","tarball":"https://registry.npmjs.org/losin/-/losin-0.0.4.tgz","integrity":"sha512-LmbRiB03L/gi7/9uoXU9QTLP8nwLp5kFrtItymX/S69hhb5C+1AtSRwFwyXFKKJXgImtKYQuifotUAfFFIWpUA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDqUk/gkUsLm/Gh1sZVEH9nW0nqla2HX1QIvX4oxady3AIhAMS2utFPbvggchsmv2KSeaWYfo5RcYgDuFD9SZUpYrhz"}]},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"yyyar","email":"yyyaroslav@gmail.com"},"maintainers":[{"name":"yyyar","email":"yyyaroslav@gmail.com"}]},"0.0.6":{"name":"losin","version":"0.0.6","description":"Request-response and validation capabilities for nossock (& other)","author":{"name":"Yaroslav Pogrebnyak","email":"yyyaroslav@gmail.com","url":"http://pogrebnyak.info"},"homepage":"http://github.com/yyyar/losin","repository":{"type":"git","url":"git@github.com:yyyar/losin.git"},"bugs":{"url":"https://github.com/yyyar/losin/issues"},"license":"MIT","engines":{"node":">= 0.10.12"},"keywords":["protocol","rpc","request-response","validation"],"scripts":{"test":"nodeunit tests --reporter verbose"},"main":"./lib/index.js","dependencies":{"jayschema":"^0.2.7","lodash":"^2.4.1","shortid":"^2.0.1","wrench":"^1.5.8"},"devDependencies":{"nossock":"0.0.10"},"_id":"losin@0.0.6","dist":{"shasum":"2e9e3d22dc9d88f22794552bfe936e28fa91ac36","tarball":"https://registry.npmjs.org/losin/-/losin-0.0.6.tgz","integrity":"sha512-r1PwAUypUiN2+BIf4oFr+prnU+deGAbyc3xO+EJllOCrF1meYkDtNmuqGYMYV4bSzoBm4XYsjFrrrzVRkMcLMQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICDh77wJI2SAOjiQrw9ajR7yInQeoigPNRDSJJYulVgKAiA1noOFXKMtNXtA4zJwmfooaiqERp390//UNtfp2xbSjQ=="}]},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"yyyar","email":"yyyaroslav@gmail.com"},"maintainers":[{"name":"yyyar","email":"yyyaroslav@gmail.com"}]},"0.0.7":{"name":"losin","version":"0.0.7","description":"Request-response and validation capabilities for nossock (& other)","author":{"name":"Yaroslav Pogrebnyak","email":"yyyaroslav@gmail.com","url":"http://pogrebnyak.info"},"homepage":"http://github.com/yyyar/losin","repository":{"type":"git","url":"git@github.com:yyyar/losin.git"},"bugs":{"url":"https://github.com/yyyar/losin/issues"},"license":"MIT","engines":{"node":">= 0.10.12"},"keywords":["protocol","rpc","request-response","validation"],"scripts":{"test":"nodeunit tests --reporter verbose"},"main":"./lib/index.js","dependencies":{"jayschema":"^0.2.7","lodash":"^2.4.1","shortid":"^2.0.1","wrench":"^1.5.8"},"devDependencies":{"nossock":"0.0.10"},"_id":"losin@0.0.7","dist":{"shasum":"dd2a55a55e037f1b5ca0b9a503cec46f421bbe8a","tarball":"https://registry.npmjs.org/losin/-/losin-0.0.7.tgz","integrity":"sha512-XRTge33MIQNXAkBKq/EEukED0fd2mZ4jjGJmQsRdFW9pyLqT139AHQnRVjWDt1eobi+7rVozDpHiS585vAChpA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICDWsN6tIhsw9flzQ7PKb7FUeICn8PhzpAQm5DxqfmN5AiAo+HCX2GzS+m25i5M9xAoQi0GKCerVCl1CqGI2CD2RzA=="}]},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"yyyar","email":"yyyaroslav@gmail.com"},"maintainers":[{"name":"yyyar","email":"yyyaroslav@gmail.com"}]},"0.0.8":{"name":"losin","version":"0.0.8","description":"Request-response and validation capabilities for nossock (& other)","author":{"name":"Yaroslav Pogrebnyak","email":"yyyaroslav@gmail.com","url":"http://pogrebnyak.info"},"homepage":"http://github.com/yyyar/losin","repository":{"type":"git","url":"git@github.com:yyyar/losin.git"},"bugs":{"url":"https://github.com/yyyar/losin/issues"},"license":"MIT","engines":{"node":">= 0.10.12"},"keywords":["protocol","rpc","request-response","validation"],"scripts":{"test":"nodeunit tests --reporter verbose"},"main":"./lib/index.js","dependencies":{"jayschema":"^0.2.7","lodash":"^2.4.1","shortid":"^2.0.1","wrench":"^1.5.8"},"devDependencies":{"nossock":"0.0.10"},"_id":"losin@0.0.8","dist":{"shasum":"2b9041d303eccdbad6dbbbf1f513d3892c947f93","tarball":"https://registry.npmjs.org/losin/-/losin-0.0.8.tgz","integrity":"sha512-t1vMcMFkWmk6zNIXPMAzBGs7em+Nik/Kuml3qdsXbMl9bsclswcdMO3A4kRp2XGqzgIwlKO9u2q1OVA7PwuYtQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDyGIIW0PwPgtGoDH0XAhCmQ0y1kEUPJweFAuJbM9B4pgIgAsVL1zCYTuC+5PIYUVFFNlrIGPtlWOZ4T3SRlyGz5Xo="}]},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"yyyar","email":"yyyaroslav@gmail.com"},"maintainers":[{"name":"yyyar","email":"yyyaroslav@gmail.com"}]},"0.0.9":{"name":"losin","version":"0.0.9","description":"Request-response and validation capabilities for nossock (& other)","author":{"name":"Yaroslav Pogrebnyak","email":"yyyaroslav@gmail.com","url":"http://pogrebnyak.info"},"homepage":"http://github.com/yyyar/losin","repository":{"type":"git","url":"git@github.com:yyyar/losin.git"},"bugs":{"url":"https://github.com/yyyar/losin/issues"},"license":"MIT","engines":{"node":">= 0.10.12"},"keywords":["protocol","rpc","request-response","validation"],"scripts":{"test":"nodeunit tests --reporter verbose"},"main":"./lib/index.js","dependencies":{"jayschema":"^0.2.7","lodash":"^2.4.1","shortid":"^2.0.1","wrench":"^1.5.8"},"devDependencies":{"nossock":"0.0.10"},"_id":"losin@0.0.9","dist":{"shasum":"d9c71f529daeafd64e0484095a6d7a1f30b28264","tarball":"https://registry.npmjs.org/losin/-/losin-0.0.9.tgz","integrity":"sha512-QQ/bptF5zthpIATot387OEjbYXw251E8LsfI7lvgysil+JWgZp9nDRKgafe9qDgi17al1jQLzQng00jHubK0cw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCfma3aMZrcsOFraM3S4pPQwlmm8Rv8BC3x1oiV9DQYZAIhAJKAX+9SZx9mojXyUSBDaD49ssMPfEQvvm+xpjyy+Sao"}]},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"yyyar","email":"yyyaroslav@gmail.com"},"maintainers":[{"name":"yyyar","email":"yyyaroslav@gmail.com"}]},"0.0.10":{"name":"losin","version":"0.0.10","description":"Request-response and validation capabilities for nossock (& other)","author":{"name":"Yaroslav Pogrebnyak","email":"yyyaroslav@gmail.com","url":"http://pogrebnyak.info"},"homepage":"http://github.com/yyyar/losin","repository":{"type":"git","url":"git@github.com:yyyar/losin.git"},"bugs":{"url":"https://github.com/yyyar/losin/issues"},"license":"MIT","engines":{"node":">= 0.10.12"},"keywords":["protocol","rpc","request-response","validation"],"scripts":{"test":"nodeunit tests --reporter verbose"},"main":"./lib/index.js","dependencies":{"jayschema":"^0.2.7","lodash":"^2.4.1","shortid":"^2.0.1","wrench":"^1.5.8"},"devDependencies":{"nossock":"0.0.10"},"_id":"losin@0.0.10","dist":{"shasum":"e4c03cae6c089c3697195b94811ec2ab24147aa2","tarball":"https://registry.npmjs.org/losin/-/losin-0.0.10.tgz","integrity":"sha512-nY720u/HKYCdntjyEVAxH2KOhUm9ZafG+h56E1t9OMdjj3JlPMAYvVA3DXziTuw6dKFTmlizpv0mvNdQFj4eXA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAGWvpdcXueLyZc9OWoNN4xJX8g5+SDU9QAv3hU8b3J+AiBPFd7BrXVV6HIw3SDcVBCd43pWW4udeRlO4AM7LS4V7w=="}]},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"yyyar","email":"yyyaroslav@gmail.com"},"maintainers":[{"name":"yyyar","email":"yyyaroslav@gmail.com"}]},"0.0.12":{"name":"losin","version":"0.0.12","description":"Request-response and validation capabilities for nossock (& other)","author":{"name":"Yaroslav Pogrebnyak","email":"yyyaroslav@gmail.com","url":"http://pogrebnyak.info"},"homepage":"http://github.com/yyyar/losin","repository":{"type":"git","url":"git@github.com:yyyar/losin.git"},"bugs":{"url":"https://github.com/yyyar/losin/issues"},"license":"MIT","engines":{"node":">= 0.10.12"},"keywords":["protocol","rpc","request-response","validation"],"scripts":{"test":"nodeunit tests --reporter verbose"},"main":"./lib/index.js","dependencies":{"jayschema":"^0.2.7","lodash":"^2.4.1","shortid":"^2.0.1","wrench":"^1.5.8"},"devDependencies":{"nossock":"0.0.10","socket.io":"^1.0.6","socket.io-client":"^1.0.6"},"_id":"losin@0.0.12","dist":{"shasum":"819a3c6e25088c6846172026405b0d94a07de1a8","tarball":"https://registry.npmjs.org/losin/-/losin-0.0.12.tgz","integrity":"sha512-SwKmWV8Rzirmf6HjXQmGeauinh8zFJPI53gENR8eDIBzzQ1XZIdE0IPHUbZPlrGA26BGD6PPYFW1AaQDk6VDjw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCUGQRkofh6cGpvWyTRSiRungyKwACT4aFePpTJDWhAQAIhAMFQTT1+OxNbNlxWvKcGFAr3YhIqSZ2d/sQnl1yLkX7V"}]},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"yyyar","email":"yyyaroslav@gmail.com"},"maintainers":[{"name":"yyyar","email":"yyyaroslav@gmail.com"}]},"0.0.13":{"name":"losin","version":"0.0.13","description":"Request-response and validation capabilities for nossock (& other)","author":{"name":"Yaroslav Pogrebnyak","email":"yyyaroslav@gmail.com","url":"http://pogrebnyak.info"},"homepage":"http://github.com/yyyar/losin","repository":{"type":"git","url":"git@github.com:yyyar/losin.git"},"bugs":{"url":"https://github.com/yyyar/losin/issues"},"license":"MIT","engines":{"node":">= 0.10.12"},"keywords":["protocol","rpc","request-response","validation"],"scripts":{"test":"nodeunit tests --reporter verbose"},"main":"./lib/index.js","dependencies":{"jayschema":"^0.2.7","lodash":"^2.4.1","shortid":"^2.0.1","wrench":"^1.5.8"},"devDependencies":{"nossock":"0.0.10","socket.io":"^1.0.6","socket.io-client":"^1.0.6"},"_id":"losin@0.0.13","dist":{"shasum":"2f1170e4f47901255ecd0962f9c2736b4d1b84ff","tarball":"https://registry.npmjs.org/losin/-/losin-0.0.13.tgz","integrity":"sha512-/brYbrnoMVhK1AzipbtciY4/GH8jY2eoWN6YoaaH1X2WTA3G7EilHuwVg+V639qmIVciCX/3D+gi8oK/xG6H4g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGMni7bUNCDbWe0+3BucsJMXQfPynayTEqGb9LTKhSeCAiEAhO0Hw3jJv4Tx5Duvo1kb4b+FLFaJhzAnNmed4K1kVxQ="}]},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"yyyar","email":"yyyaroslav@gmail.com"},"maintainers":[{"name":"yyyar","email":"yyyaroslav@gmail.com"}]},"0.0.14":{"name":"losin","version":"0.0.14","description":"Request-response and validation capabilities for nossock (& other)","author":{"name":"Yaroslav Pogrebnyak","email":"yyyaroslav@gmail.com","url":"http://pogrebnyak.info"},"homepage":"http://github.com/yyyar/losin","repository":{"type":"git","url":"git@github.com:yyyar/losin.git"},"bugs":{"url":"https://github.com/yyyar/losin/issues"},"license":"MIT","engines":{"node":">= 0.10.12"},"keywords":["protocol","rpc","request-response","validation"],"scripts":{"test":"nodeunit tests --reporter verbose"},"main":"./lib/index.js","dependencies":{"jayschema":"^0.2.7","lodash":"^2.4.1","shortid":"^2.0.1","wrench":"^1.5.8"},"devDependencies":{"nossock":"0.0.10","socket.io":"^1.0.6","socket.io-client":"^1.0.6"},"_id":"losin@0.0.14","dist":{"shasum":"81f1c0dfad4ce8feca742cf66e36f365aedb12c1","tarball":"https://registry.npmjs.org/losin/-/losin-0.0.14.tgz","integrity":"sha512-7lWOUXBlfoCrncz01G7YEK8aDKVxtk0/MEgEs6ZpzIjwB3LI9PqpUuQ6swAUO0azMOjSEmW3HGlJ7Vu6Eq3kHg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCbb3ZRHhe15oQnpWqYKhqGQzL1vc0W1zVZS2bzjg1BygIhAJo0l3qTT0JoHoBFvNfaJeFGRGIiAA4gwgXy+Aw1pKNU"}]},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"yyyar","email":"yyyaroslav@gmail.com"},"maintainers":[{"name":"yyyar","email":"yyyaroslav@gmail.com"}]},"0.0.15":{"name":"losin","version":"0.0.15","description":"Request-response and validation capabilities for nossock (& other)","author":{"name":"Yaroslav Pogrebnyak","email":"yyyaroslav@gmail.com","url":"http://pogrebnyak.info"},"homepage":"http://github.com/yyyar/losin","repository":{"type":"git","url":"git@github.com:yyyar/losin.git"},"bugs":{"url":"https://github.com/yyyar/losin/issues"},"license":"MIT","engines":{"node":">= 0.10.12"},"keywords":["protocol","rpc","request-response","validation"],"scripts":{"test":"nodeunit tests --reporter verbose"},"main":"./lib/index.js","dependencies":{"jayschema":"^0.2.7","lodash":"^2.4.1","shortid":"^2.0.1","wrench":"^1.5.8"},"devDependencies":{"nossock":"0.0.10","socket.io":"^1.2.1","socket.io-client":"^1.2.1"},"_id":"losin@0.0.15","dist":{"shasum":"23568dbd26460bf50a76e3f4cb0e988f3b4227f4","tarball":"https://registry.npmjs.org/losin/-/losin-0.0.15.tgz","integrity":"sha512-yfcqjM/fNBcSFGN5iNZoM602AvWgAGKTE3zd7z5QuBWQ3TACSyX397+dTPMC0CfOa4sf66C22Ib3Fo742u1eyQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF0MkKLSElxBRgtjBFPTbx3Twohgbe35pTzfNwUX4zYJAiB5DTWi0NHOijB+4hrs90x32RvMqbPUT87gSoujguQI9A=="}]},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"yyyar","email":"yyyaroslav@gmail.com"},"maintainers":[{"name":"yyyar","email":"yyyaroslav@gmail.com"}]},"0.0.16":{"name":"losin","version":"0.0.16","description":"Request-response and validation capabilities for nossock (& other)","author":{"name":"Yaroslav Pogrebnyak","email":"yyyaroslav@gmail.com","url":"http://pogrebnyak.info"},"homepage":"http://github.com/yyyar/losin","repository":{"type":"git","url":"git@github.com:yyyar/losin.git"},"bugs":{"url":"https://github.com/yyyar/losin/issues"},"license":"MIT","engines":{"node":">= 0.10.12"},"keywords":["protocol","rpc","request-response","validation"],"scripts":{"test":"nodeunit tests --reporter verbose"},"main":"./lib/index.js","dependencies":{"jayschema":"^0.2.7","lodash":"^2.4.1","shortid":"^2.0.1","wrench":"^1.5.8"},"devDependencies":{"nossock":"0.0.10","socket.io":"^1.2.1","socket.io-client":"^1.2.1"},"_id":"losin@0.0.16","dist":{"shasum":"05e7f8f6e003f2782418392927bf68ae79c13829","tarball":"https://registry.npmjs.org/losin/-/losin-0.0.16.tgz","integrity":"sha512-ZL+ZZDMzihDFjKLE3dcn0LtuBeS4Cf/3rF/pRBstG+XTxpCzF4yl8hH20XxnizEDvJ8XF0b2I832FVzqCfD5NQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGK7zyPv4MQLkONBGHkxLelhH1fo8PVOTAn39SLXRMWEAiEA0Q6kUmUA8qxyYCFFZ2h/5yx4hhXvA5VbSwieCttnEj8="}]},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"yyyar","email":"yyyaroslav@gmail.com"},"maintainers":[{"name":"yyyar","email":"yyyaroslav@gmail.com"}]},"0.0.17":{"name":"losin","version":"0.0.17","description":"Request-response and validation capabilities for nossock (& other)","author":{"name":"Yaroslav Pogrebnyak","email":"yyyaroslav@gmail.com","url":"http://pogrebnyak.info"},"homepage":"http://github.com/yyyar/losin","repository":{"type":"git","url":"git@github.com:yyyar/losin.git"},"bugs":{"url":"https://github.com/yyyar/losin/issues"},"license":"MIT","engines":{"node":">= 0.10.12"},"keywords":["protocol","rpc","request-response","validation"],"scripts":{"test":"nodeunit tests --reporter verbose"},"main":"./lib/index.js","dependencies":{"jayschema":"^0.2.7","lodash":"^2.4.1","shortid":"^2.0.1","wrench":"^1.5.8"},"devDependencies":{"nossock":"0.0.10","socket.io":"^1.2.1","socket.io-client":"^1.2.1"},"_id":"losin@0.0.17","dist":{"shasum":"2039196feb0f714a0c32f9049f418b4c06172389","tarball":"https://registry.npmjs.org/losin/-/losin-0.0.17.tgz","integrity":"sha512-BHQGrOxhiBhCo5zaM9c2otMU9hwhP6aqCD/ZKs4Z9GM6wAoWaNw6UgPY7oGhPOEcjzqfn1EGdxuPxONW3gxpQA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCkL/VXrj7MMkc1Upf934oUn55Olwat9nq+ZHr93VlXWAIhAPhhUWEqMVZTB2LC6or2bqdWR7Dl/zGQxaYQGCsyewKW"}]},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"yyyar","email":"yyyaroslav@gmail.com"},"maintainers":[{"name":"yyyar","email":"yyyaroslav@gmail.com"}]},"0.0.18":{"name":"losin","version":"0.0.18","description":"Request-response and validation capabilities for nossock (& other)","author":{"name":"Yaroslav Pogrebnyak","email":"yyyaroslav@gmail.com","url":"http://pogrebnyak.info"},"homepage":"http://github.com/yyyar/losin","repository":{"type":"git","url":"git@github.com:yyyar/losin.git"},"bugs":{"url":"https://github.com/yyyar/losin/issues"},"license":"MIT","engines":{"node":">= 0.10.12"},"keywords":["protocol","rpc","request-response","validation"],"scripts":{"test":"nodeunit tests --reporter verbose"},"main":"./lib/index.js","dependencies":{"jayschema":"^0.2.7","lodash":"^2.4.1","shortid":"^2.0.1","wrench":"^1.5.8"},"devDependencies":{"nossock":"0.0.10","socket.io":"^1.2.1","socket.io-client":"^1.2.1"},"_id":"losin@0.0.18","dist":{"shasum":"61b27bef36378d6a5ccbd14df4fb816411725ffd","tarball":"https://registry.npmjs.org/losin/-/losin-0.0.18.tgz","integrity":"sha512-1X8CCoJK44oK5jLS1HoXxCxzpYu3bcWX6Ggcz8Mzb7VQvpGKXUCV23+JhHx05qzGlav7IsLpE9Pke9vbdfySJg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCaKxZ48uPZ6c0l1GtxWcILuYekIphaGRHssopRqqrvDgIgTh9NTo4jnBYt2PhUMpDSJV6vGl+NRdCsBhlCtbppCSY="}]},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"yyyar","email":"yyyaroslav@gmail.com"},"maintainers":[{"name":"yyyar","email":"yyyaroslav@gmail.com"}]},"0.0.19":{"name":"losin","version":"0.0.19","description":"Request-response and validation capabilities for nossock (& other)","author":{"name":"Yaroslav Pogrebnyak","email":"yyyaroslav@gmail.com","url":"http://pogrebnyak.info"},"homepage":"http://github.com/yyyar/losin","repository":{"type":"git","url":"git@github.com:yyyar/losin.git"},"bugs":{"url":"https://github.com/yyyar/losin/issues"},"license":"MIT","engines":{"node":">= 0.10.12"},"keywords":["protocol","rpc","request-response","validation"],"scripts":{"test":"nodeunit tests --reporter verbose"},"main":"./lib/index.js","dependencies":{"jayschema":"^0.2.7","lodash":"^2.4.1","shortid":"^2.0.1","wrench":"^1.5.8"},"devDependencies":{"nossock":"0.0.10","socket.io":"^1.2.1","socket.io-client":"^1.2.1"},"_id":"losin@0.0.19","dist":{"shasum":"17226fbc1e895eacf36a2032d1eeb3682a13209d","tarball":"https://registry.npmjs.org/losin/-/losin-0.0.19.tgz","integrity":"sha512-U17D373OnNUra0NzN3p9tSMWDUwcbKtle8XJ/uxdhWbPZzpihxlr1Hew+biAOGpNDM7f6wiCLN/CpMrtU96zjQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBBAbbGQE3wxKU5VzCGgqQzd7Bu4+SGYLPSdbZX/EEz6AiAVThGmxjyct8UrjuleZqL3onGgj6yCGpAgB3jQAbnpZA=="}]},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"yyyar","email":"yyyaroslav@gmail.com"},"maintainers":[{"name":"yyyar","email":"yyyaroslav@gmail.com"}]},"0.0.20":{"name":"losin","version":"0.0.20","description":"Request-response and validation capabilities for nossock (& other)","author":{"name":"Yaroslav Pogrebnyak","email":"yyyaroslav@gmail.com","url":"http://pogrebnyak.info"},"homepage":"http://github.com/yyyar/losin","repository":{"type":"git","url":"git@github.com:yyyar/losin.git"},"bugs":{"url":"https://github.com/yyyar/losin/issues"},"license":"MIT","engines":{"node":">= 0.10.12"},"keywords":["protocol","rpc","request-response","validation"],"scripts":{"test":"nodeunit tests --reporter verbose"},"main":"./lib/index.js","dependencies":{"jayschema":"^0.2.7","lodash":"^2.4.1","shortid":"^2.0.1","wrench":"^1.5.8"},"devDependencies":{"nossock":"0.0.10","socket.io":"^1.2.1","socket.io-client":"^1.2.1"},"gitHead":"4cf1b67ddc6a43ed970d4a93bc577b0abc0e4c56","_id":"losin@0.0.20","_shasum":"e792cdd3903082cebc0c97a8fcbff9dad9b1b964","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"yyyar","email":"yyyaroslav@gmail.com"},"maintainers":[{"name":"yyyar","email":"yyyaroslav@gmail.com"}],"dist":{"shasum":"e792cdd3903082cebc0c97a8fcbff9dad9b1b964","tarball":"https://registry.npmjs.org/losin/-/losin-0.0.20.tgz","integrity":"sha512-HFwFg2MuG5qNLPhsBmKU0NFvn2pH/rj5ko7LVdac9gb5E9dcim5dac/k3xAE1Pq6uaRwy2sFe/WEYEMAVokbHA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG2HahHjCZj3sX09T0DH7xbcQRqDOcxfRRElrMOpaGnAAiEA+Km/sMmANcRbwEkVFku37l5sawfuGfImPI2KkihovlM="}]}},"0.0.21":{"name":"losin","version":"0.0.21","description":"Request-response and validation capabilities for nossock (& other)","author":{"name":"Yaroslav Pogrebnyak","email":"yyyaroslav@gmail.com","url":"http://pogrebnyak.info"},"homepage":"http://github.com/yyyar/losin","repository":{"type":"git","url":"git@github.com:yyyar/losin.git"},"bugs":{"url":"https://github.com/yyyar/losin/issues"},"license":"MIT","engines":{"node":">= 0.10.12"},"keywords":["protocol","rpc","request-response","validation"],"scripts":{"test":"nodeunit tests --reporter verbose"},"main":"./lib/index.js","dependencies":{"jayschema":"^0.2.7","lodash":"^2.4.1","shortid":"^2.0.1","wrench":"^1.5.8"},"devDependencies":{"nossock":"0.0.10","socket.io":"^1.2.1","socket.io-client":"^1.2.1"},"_id":"losin@0.0.21","dist":{"shasum":"c1f82872c16f2bd024b95ceb51e34bb4fb1c0961","tarball":"https://registry.npmjs.org/losin/-/losin-0.0.21.tgz","integrity":"sha512-ATTLzjj3OUWYAjndQcEHq06N+1z8hlMBGvqy07N6C3J96cqcvM+wF2e9czcqi8Xyo457/quFVJWBYnb4eXPMig==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAsO6BTfK/B41Iof4egajfQXIf/9FqylEIxIObcXXsv2AiEA7sokZr8ZgnHbnTnn2MknHsJ+04BMbSpc1jOUEslbtqc="}]},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"yyyar","email":"yyyaroslav@gmail.com"},"maintainers":[{"name":"yyyar","email":"yyyaroslav@gmail.com"}]}},"readme":"## Losin\n\n[![Build Status](https://travis-ci.org/yyyar/losin.svg?branch=master)](https://travis-ci.org/yyyar/losin) [![NPM version](https://badge.fury.io/js/losin.svg)](http://badge.fury.io/js/losin)\n\nLosin is a small lib that adds request-response and validation\ncapabilities to [socket.io](http://socket.io/) and [nossock](https://github.com/yyyar/nossock).\nWrappers for other libraries may come soon.\n\n\n* **Validation**: Define messages schemas to validate them\n* **Req-Res**: Request-response messages\n* **Timeouts**: Support of timeout handlers in request messages\n\n### Installation\n```bash\n$ npm install losin\n```\n\n\n### Usage\n\n#### Creating Losin\n\n```javascript\n// create adapter\nvar losin = require('losin')('socket.io'),\n    lo = losin.createLosin(socket, config);\n\n// Regestering messages (see validation section for more info on spec)\nlo.register( /* {spec} */ );\n```\n\nconfig is optional and has the following format:\n```javascript\n{\n  'reqTimeout': 5,\n  'processInvalid': false,\n  'validationErrorHandler': function(name, errors) {\n      console.warn('Validation error', name, errors);\n  },\n  'logHandler': function(type, direction, name, body, err) {\n      console.log(direction + \"(\" + type + \")\", name, ':', type == 'res' && err ? err : '', body);\n  }\n}\n```\n\n##### Pub-sub\n\nHandling:\n```javascript\nlo.handle('info', function(msg) {\n    console.log(msg);\n});\n```\n\nSending:\n```javascript\nlo.sendMessage('info', 'Hello');\n```\n\n##### Req-res\n\nHandling:\n```javascript\nlo.handle('someReq', function(req, sendResponse) {\n\n    // success response\n    sendResponse(null, req[0] + req[1]);\n    \n    // or error response\n    // sendResponse('Something bad happened', null);\n});\n\n```\n\nSending:\n```javascript\nlo.sendRequest('sum', [1,2], function(err, data) {\n\n    // err - if we got error response, or timeout happened\n    if (err) {\n        console.log(err);\n    } else {\n        console.log(data);\n    }\n\n});\n\n```\n\n##### Closing connection & handling connection drop\n```javascript\n// Close connection\nlo.close();\n\n// Handle connection close\nlo.onClose(function() {\n    // some code\n});\n```\n\n#### Complete example\n\n##### spec.json\n\n```json\n{\n\n    \"info\": {\n        \"description\": \"Just some info message with payload\",\n        \"type\": \"pub-sub\",\n\n        \"msg\": {\n            \"payload\": {\n                \"type\": \"string\"\n            }\n        }\n    },\n\n    \"sum\": {\n        \"description\": \"Sum endpoint that does sum of numbers\",\n        \"type\": \"req-res\",\n        \"ttl\": 30,\n\n        \"req\": {\n            \"description\": \"Array of numbers to sum\",\n            \"type\": \"array\",\n            \"items\": { \"type\": \"number\"}\n        },\n\n        \"res\": {\n            \"description\": \"Sum of numbers\",\n            \"type\": \"number\"\n        }\n    }\n}\n```\n\n##### server.js\n\n```javascript\nvar _ = require('lodash'),\n    losin = require('losin')('socket.io'),\n    app = require('http').createServer(function(){}),\n    io = require('socket.io').listen(app);\n\n    app.listen(8797);\n\nvar spec = require('./spec.json');\n\n \n/* ---------- server ---------- */\n\nio.on('connection', function(socket) {\n\n  var lo = losin.createLosin(socket);\n  lo.register(spec);\n\n  /**\n   * Handles close\n   */\n  lo.onClose(function() {\n      console.log('onClose socketio server');\n  });\n\n  /**\n   * Handle info message\n   */\n  lo.handle('info', function(msg) {\n      console.log(msg);\n  });\n\n  /**\n   * Handle sum request\n   */\n  lo.handle('sum', function(nums, sendResponse) {\n    sendResponse(null, _.reduce(nums, function(s,e) {return s+e; }, 0));\n  });\n\n});\n```\n\n\n##### client.js\n```javascript\nvar _ = require('lodash'),\n    losin = require('losin')('socket.io'),\n    socket = require('socket.io-client').connect('http://localhost:8797');\n\nvar spec = require('./spec.json');\n\n/* ---------- client ---------- */\n\nsocket.on('connect', function(socket) {\n\n  var lo = losin.createLosin(socket);\n  lo.register(spec);\n\n  /**\n   * Send info message\n   */\n  lo.sendMessage('info', 'hello world!');\n\n  /**\n   * Send request\n   */\n   lo.sendRequest('sum', [1,2,3], function(err, data) {\n       if (err) {\n           console.log(err);\n       } else {\n           console.log(data);\n       }\n   });\n\n});\n \n```\n\n### Losin protocol definition\n\nTypically, message is a JSON document.\n\nThere are 2 types of messages in Losin:\n* Pub/sub messages\n* Request-respnse messages\n\n#### Pub-sub messages\nPub-sub are plain messages. One side subscribes on it by name, and other side sends\nit providing the same name and a message. Low-level protocol (socket.io, nossock or other)\nshould support this feature out of the box.\n\n*message*\n```\n{\n    \"name\": <name>\n    \"body\": JSON\n}\n```\n\n#### Req-res messages\nReq-res is request-response messages. One side sends \"request\" message to another,\nand awaits response for it. Other side provides handler of the request that receives\nrequest message and sends back response (err, responseObject) where err is null when request was\nsuccessfully processed, and some object otherwise.\n\nRequester side is responsive of generating unique identifier of request, and \nresponder side is responsive of using the same identifier for a response.\n\nThere is a default timeout value for request-response messages parties should agree on,\nafter this time requester should receive timeout error in err, and implementation should stop\nwaiting the response after that time. Timeout value can be configurable for each\nreq-res messages individually in message spec (see validation section).\n\nImplementations should follow these naming conventions for implemention req-res. \n\n*request*\n```\n{\n    \"name\": \"req:<name>:<id>\",\n    \"body\": JSON\n}\n\n<name> = name of the req-res message\n<id> = generated unique id, it should match regexp: [-_\\w]+, i.e. contain only numbers,\n        alphabetic chars and '-' or '_' chars.\n\n```\n\n*response*\n```\n{\n    \"name\": \"res:<name>:<id>\",\n    \"body\": [ <err>, <reponse> ]\n}\n\n\n<name> = name of req-res-message\n<id> = id send by requester in request\n<err> = null | JSON\n<response> = null | JSON\n```\n\n#### Specs & messages registry: Validation\nImplementation may (it's optional, but very desirable) define a way of validation all\nmessages. Parties agree on messages and format of messages defining a registry of\nmessages specs. Registry is a JSON document with the following structure:\n```\n{\n    // pub-sub message\n    \"someMessage\": {\n        \"description\": \"some literate description\",\n        \"type\": \"pub-sub\",\n        \"msg\": { JaySchema }\n    },\n\n    // req-res message\n    \"someCommand\": {\n        \"description\": \"some literate description\",\n        \"type\": \"req-res\",\n        \"ttl\": 15, // time-to-live in seconds\n        \"req\": { JaySchema },\n        \"res\": { JaySchema }\n    },\n\n    // ...\n    // other messages\n    // ...\n}\n```\n\nRegistry is shared between parties so they could be sured they use the right messages and format.\nJaySchema is javascript implementation of JSON schema validation. \nIt follows [JSON Schema Draft v4](http://json-schema.org/documentation.html).\n\n\n#### Tests\n```bash\n$ sudo npm install nodeunit -g\n$ npm test\n```\n\n#### Author\n* [Yaroslav Pogrebnyak](https://github.com/yyyar/)\n\n#### License\nMIT\n","maintainers":[{"name":"yyyar","email":"yyyaroslav@gmail.com"}],"time":{"modified":"2022-06-19T14:21:38.606Z","created":"2014-07-04T10:16:36.114Z","0.0.1":"2014-07-04T10:16:36.114Z","0.0.2":"2014-07-04T10:19:28.251Z","0.0.3":"2014-07-12T09:50:33.709Z","0.0.4":"2014-07-12T14:54:35.265Z","0.0.6":"2014-07-14T14:01:27.674Z","0.0.7":"2014-07-15T10:39:48.520Z","0.0.8":"2014-07-15T12:16:46.566Z","0.0.9":"2014-07-15T14:23:23.559Z","0.0.10":"2014-07-16T13:10:19.125Z","0.0.12":"2014-07-23T10:35:08.400Z","0.0.13":"2014-08-01T11:48:38.138Z","0.0.14":"2014-08-01T12:16:41.051Z","0.0.15":"2014-12-08T11:08:38.042Z","0.0.16":"2015-01-19T07:49:19.621Z","0.0.17":"2015-02-03T08:31:06.754Z","0.0.18":"2015-02-10T07:43:56.938Z","0.0.19":"2015-02-17T08:09:21.801Z","0.0.20":"2015-04-24T01:05:45.896Z","0.0.21":"2015-04-29T11:16:06.243Z"},"homepage":"http://github.com/yyyar/losin","keywords":["protocol","rpc","request-response","validation"],"repository":{"type":"git","url":"git@github.com:yyyar/losin.git"},"author":{"name":"Yaroslav Pogrebnyak","email":"yyyaroslav@gmail.com","url":"http://pogrebnyak.info"},"bugs":{"url":"https://github.com/yyyar/losin/issues"},"license":"MIT","readmeFilename":"README.md"}