UNPKG

@instructure/quiz-interactions

Version:

A React UI component Library for quiz interaction types.

19 lines (18 loc) 595 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.UNCATEGORIZED = void 0; exports.getSortedCategories = getSortedCategories; var UNCATEGORIZED = exports.UNCATEGORIZED = 'uncategorized'; function getSortedCategories(categories, categoryOrder) { // this check is for questions which were created before // categoryOrder was introduced if (!categoryOrder) { // NOTE: Object.values does not guarantee category order return Object.values(categories); } return categoryOrder.map(function (categoryId) { return categories[categoryId]; }); }