UNPKG

math-q-factory

Version:

node module that return maths questions

14 lines (11 loc) 432 B
const { proportionSectionList } = require('./proportionSectionList'); const defaultQ = { q: 'default proportion Q', a: 42 } const proportionQs = (section = '', qName = '') => { if (proportionSectionList[section] === undefined) { return defaultQ } let question = proportionSectionList[section].qGetter(qName); return question } module.exports = { chapterName: 'proportion', qGetter: proportionQs }