Socket
Socket
Sign inDemoInstall

daab-session

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

daab-session

simple session middleware for daab


Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

daab-session

This library adds support for a conversation session to daab.

Installation

npm install daab-session

Usage

You can use this library as follows:

const { withSession } = require('daab-session');

const actions = robot => {
  robot.respond(/ping$/i, res => {
    let session = res.session; // current session object. it has 'id' and 'data' fields.
    ...
  });
};

module.exports = withSession(actions);

The default store is MemoryStore. There is RedisStore as another store implementation.

More information about usage can be found in the examples directory.

Keywords

FAQs

Package last updated on 16 Jul 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc