{"_id":"@caijs/console-connector","_rev":"2-0660700bace7d76792d24c911db01762","name":"@caijs/console-connector","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@caijs/console-connector","description":"Console Connector","version":"1.0.0","main":"src/index.js","scripts":{"coveralls":"jest --coverage && cat ./tests/coverage/lcov.info | coveralls","lint":"eslint .","lintfix":"eslint --fix .","test":"eslint --fix . && jest --silent --coverage --maxWorkers=4 .","bench":"node ./bench"},"author":{"name":"Jesus Seijas","email":"jseijas@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/CAI-js/console-connector.git"},"bugs":{"url":"git+https://github.com/CAI-js/console-connector/issues"},"maintainers":[{"name":"jesus-seijas","email":"jseijas@gmail.com"},{"name":"jseijas","email":"jseijas@gmail.com"}],"license":"MIT","dependencies":{},"devDependencies":{"coveralls":"^3.0.9","eslint":"^6.8.0","eslint-config-airbnb-base":"^14.0.0","eslint-config-prettier":"^6.10.0","eslint-plugin-import":"^2.20.1","eslint-plugin-jest":"^23.8.2","eslint-plugin-prettier":"^3.1.2","jest":"^25.1.0","prettier":"^1.19.1"},"jest":{"verbose":true,"testURL":"http://localhost/","collectCoverage":false,"collectCoverageFrom":[],"coverageDirectory":"coverage","testEnvironment":"node"},"gitHead":"7fae4335fcade74f3c283140611e4ae305007c38","homepage":"https://github.com/CAI-js/console-connector#readme","_id":"@caijs/console-connector@1.0.0","_nodeVersion":"12.12.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-edVsRrVjsk4xoFxczdJs2BvC8raZMAqkmXQL4Nzyv/ZzJOEXn+dfe3f2VBHwM7DRTRKl8bSXgT2yFe3XcqcdlQ==","shasum":"10d96bd78fed9629f2169bdb026b0d81768dab1b","tarball":"https://registry.npmjs.org/@caijs/console-connector/-/console-connector-1.0.0.tgz","fileCount":7,"unpackedSize":4932,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeZUZwCRA9TVsSAnZWagAAY5IQAI/HCX/dPLsHmV57+KD4\nV2zgzRvB9NmAvCT6bsVPL3tTBEpIq74YP1+7YtPx/U9GGn7O/2+VhqYRIlhr\nX47+HSm4dHp/vzdu2f0g6haqlXPeEPRUmXqL+JkMhlWlzZSg0aEwIgifcs6J\nfu4TxlDyg6hj6iPGNdpVsxgjUTIXWiRu0RG3b+oCZ1gUbstYY5c88XiXn16G\n9UscuvKo4M6nyy1GKlP/G2Ob2pxZcFOBSLA7teZA3cRTaNp5goxKD6koN01B\neKm2JUAPvXJXxEvaZZYot2a5ix7/JUAFRldwZAj+jOrwQUad7I81pnvBnB04\nUxE3PclCpsUNVYRyCm89Yz0OITvuvkJWh5DBwx5ILxQjCbFSSTLcFexS9xNK\nFMdP3AyGpK8KTXAh889tOdLcjGVb01XfDPqNe0ikPpSiEiEvaj3xFHOv68rs\nii8miHurouZ/qn041BCnLO3tbvLQZPXkacMdjApZBP5lkamGaj8bimJhM37O\nAcCIageR9JzhtbpBQutvi9RkmRstf85DeEgc7VtWTQMn4nodafiCrQYxJV5l\nILEb8o3BfGeucYnA4C0gLBTeXR1YDu7JYJvzoAvhRLNfY2hynUT1DvIA9+7W\nHbERX0kmVj+BFjtt2LNwV0KJWMCd0A5B9FaMgWioB1CjSontQrs4IR0iTZPy\nhiMD\r\n=27Xv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB1aE2oJhprvYsCxIpBLEEEqCNm2qEr7doH9cFtedxRTAiEAvDiJxYvWPR7GtPkvLXchGfGXvM5nBaXKQN6sbdHo0g4="}]},"_npmUser":{"name":"jesus-seijas","email":"jseijas@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/console-connector_1.0.0_1583695472430_0.8774704258136754"},"_hasShrinkwrap":false},"1.0.1":{"name":"@caijs/console-connector","description":"Console Connector","version":"1.0.1","main":"src/index.js","scripts":{"coveralls":"jest --coverage && cat ./tests/coverage/lcov.info | coveralls","lint":"eslint .","lintfix":"eslint --fix .","test":"eslint --fix . && jest --silent --coverage --maxWorkers=4 .","bench":"node ./bench"},"author":{"name":"Jesus Seijas","email":"jseijas@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/CAI-js/console-connector.git"},"bugs":{"url":"git+https://github.com/CAI-js/console-connector/issues"},"maintainers":[{"name":"jesus-seijas","email":"jseijas@gmail.com"},{"name":"jseijas","email":"jseijas@gmail.com"}],"license":"MIT","dependencies":{},"devDependencies":{"coveralls":"^3.0.9","eslint":"^6.8.0","eslint-config-airbnb-base":"^14.0.0","eslint-config-prettier":"^6.10.0","eslint-plugin-import":"^2.20.1","eslint-plugin-jest":"^23.8.2","eslint-plugin-prettier":"^3.1.2","jest":"^25.1.0","prettier":"^1.19.1"},"jest":{"verbose":true,"testURL":"http://localhost/","collectCoverage":false,"collectCoverageFrom":[],"coverageDirectory":"coverage","testEnvironment":"node"},"gitHead":"146442589e74e0f812f0d562b456db09dfb00dc1","homepage":"https://github.com/CAI-js/console-connector#readme","_id":"@caijs/console-connector@1.0.1","_nodeVersion":"12.12.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-CyyhtwWOb+6h2UytYZcPeMO19At5s5OlHEFlGaIxheR/2BVDSCfeWSRG2ZtpvKJXbj0gKCCyB0FSmOXhwrsw0w==","shasum":"a1c45523b1790815589c9896a5df218b0811ef28","tarball":"https://registry.npmjs.org/@caijs/console-connector/-/console-connector-1.0.1.tgz","fileCount":8,"unpackedSize":5678,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeaBNCCRA9TVsSAnZWagAASSgP/0N3GSri7wU3cvofOEbk\nfP3yPvGRVpJ3jSRG23IipwSDdtQmbWrxCl0pkVrDrzhdVOrm1ZioRV6/uqDh\nzghmQV3rdasSHzSKgXjZfL6xp+TOp7sY7+PwzBn9xhdI46FjjYUfkkQCBSlc\nTtR2aoi40NlFp83OYSe1+4+quUeIS88UxyU//5oVzbI7SglVHqWIzm+88i28\nf/DKpDiZBjyizxrsxflQIM9Dhgt3NtLZsf5Gtl+WMhCM12Ja3MNf8EmrnJy/\nK3CnFQ4YfQeOse9+TBWq8w4SWxGDvNfe0TLn/4QHIp12YLHfmu8FdQ38zLMR\n62n8eWZ38P76UST7eEmsukpd7PwjjlStTTJ67nWtnByvSnkkXXsIZhMRy/3L\n23hU5LWv4szRMWomRsylSRmIQTzVRjaVuAW+5wcXvbdv0vVfmAThVKRNctfe\nmCOelkBMXf7aTkHrQjSh6cy9vJQvWH3JSgK583Pi9mk/Fc3NaL/jqxNWStSw\nxBlsiG3ISs8yNCpCMcJoNM/bUmRTMOqehD9T/2m4hcOF1G0O78ClQUEbmGL+\nzIGmgTbkaFLrChjaJaH9Hn2XdjKl2LrMlvnMkzK/L+f9yVLqzqTL+F4eQ9zX\njNsSdyN1WJjJspTAoR5uCnkAz+ChtUWcytWKQ48Aegg14Xs0ufLJoGyI3H1k\n8Ls+\r\n=nm+b\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDnev5EK3m6U2cBp7P/rLxqXJyv0tHYTZG6PBJ2HlIGSAIhAOw4NniatCCguZHa5Rsv7H3VkonJmOU8HwnEXTvYJehz"}]},"_npmUser":{"name":"jesus-seijas","email":"jseijas@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/console-connector_1.0.1_1583878977636_0.8041962028462717"},"_hasShrinkwrap":false}},"time":{"created":"2020-03-08T19:24:32.207Z","1.0.0":"2020-03-08T19:24:32.568Z","modified":"2022-04-04T21:30:56.787Z","1.0.1":"2020-03-10T22:22:57.759Z"},"maintainers":[{"name":"jesus-seijas","email":"jseijas@gmail.com"},{"name":"jseijas","email":"jseijas@gmail.com"}],"description":"Console Connector","homepage":"https://github.com/CAI-js/console-connector#readme","repository":{"type":"git","url":"git+https://github.com/CAI-js/console-connector.git"},"author":{"name":"Jesus Seijas","email":"jseijas@gmail.com"},"bugs":{"url":"git+https://github.com/CAI-js/console-connector/issues"},"license":"MIT","readme":"# @caijs/console-connector\r\n\r\n[![Build Status](https://travis-ci.com/CAI-js/console-connector.svg?branch=master)](https://travis-ci.com/CAI-js/console-connector)\r\n[![Coverage Status](https://coveralls.io/repos/github/CAI-js/console-connector/badge.svg?branch=master)](https://coveralls.io/github/CAI-js/console-connector?branch=master)\r\n[![NPM version](https://img.shields.io/npm/v/@caijs/console-connector.svg?style=flat)](https://www.npmjs.com/package/@caijs/console-connector)\r\n[![NPM downloads](https://img.shields.io/npm/dm/@caijs/console-connector.svg?style=flat)](https://www.npmjs.com/package/@caijs/console-connector)\r\n\r\nA console connector to build console based chatbots.\r\n\r\n## Installation\r\n\r\nIn your project folder run:\r\n\r\n```bash\r\n$ npm install @caijs/console-connector\r\n```\r\n\r\n## Example of use\r\n\r\n```javascript\r\nconst ConsoleConnector = require('@caijs/console-connector');\r\n\r\nfunction onHear(connector, input) {\r\n  if (input.message.toLowerCase() === 'quit') {\r\n    connector.destroy();\r\n  } else {\r\n    connector.say(input.message.split('').reverse().join(''));\r\n  }\r\n}\r\n\r\nconst connector = new ConsoleConnector({ onHear });\r\nconnector.initialize();\r\nconnector.say('Say something, I will reverse it! Say \"quit\" to end the conversation');\r\n```\r\n","readmeFilename":"README.md"}