all files / packages/navigation/tag-defs/ sort-order.js

50% Statements 2/4
0% Branches 0/2
33.33% Functions 1/3
50% Lines 2/4
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15                         
/**
 * Defines @sortOrder [weight] tag
 * @type {Object}
 */
module.exports = function sortOrderTagDef() {
  return {
    name: 'sortOrder',
    transforms: function(doc, tag, value) {
      return parseInt(value, 10) || 0;
    },
    defaultFn: function () {
      return 0;
    }
  }
};