JSPM

fagerstrom-test

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q32412F
  • License MIT

FTND (Fagerstrom Test for Nicotine Dependence) questionnaire wording and score calculation

Package Exports

  • fagerstrom-test

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (fagerstrom-test) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Fagerstrom-Test

FTND (Fagerstrom Test for Nicotine Dependence) questionnaire wording and score calculation

install

npm install fagerstrom-test --save

usage

const FTND = require('fagerstrom-test');

Get a list of questions

FTND.getQuestions();

Get question choices

FTND.getChoices(0); // Q1 choice array
FTND.getChoices(4); // Q5 choice array

Calculate score

// Argument is an array of answers from Q1 to Q6. It passes a column of array index values ​​obtained with getChoices
FTND.calculate([2,1,0,3,1,0]); // Returns 6.

LICENSE

MIT