Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

likert

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

likert

Survey data flow engine.

  • 0.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Likert

Build Status Coverage Status

Survey data flow engine.

Install

npm install likert

Usage

import createSurvey from 'likert';

const spec = {
  'Do you like vegetables?': {
    options: ['Yes', 'No'],
    next: answer => {
      if (answer === 'Yes') return 'What\'s your favorite vegetable?';
      else return 'Thank you for taking our survey! Any last words?';
    }
  },
  'What\'s your favorite vegetable?': {
    options: [
      'Corn', 'Carrots', 'Tomatoes'
    ],
    next: answer => {
      if (answer === 'Tomatoes') return 'You do realize tomatoes are a fruit, right?';
      else return 'Thank you for taking our survey! Any last words?'; 
    }
  },
  'You do realize tomatoes are a fruit, right?': [
    'Yes', 'No'
  ],
  'Thank you for taking our survey! Any last words?': {} 
}

const question1 = createSurvey(spec2);
const question2 = question1.answer('Yes');
const question3 = question2.answer('Corn');
const question4 = question3.answer('I love vegetables!');

License

MIT


pori.io  ·  GitHub @pori  ·  Twitter @pori_alex

Keywords

FAQs

Package last updated on 26 Aug 2016

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