'use strict'; module.exports = function(header, contents) { if (/^(?:module )?api$/i.test(header)) { return "api"; } else if (/^events$/i.test(header)) { return "events"; } else if (/^options$/i.test(header)) { return "options"; } else if (/^(?:tips|notes)$/i.test(header)) { return "notes"; } else if (/(?:usage|examples?)/i.test(header)) { // FIXME: Detect API methods under 'usage' return "example"; } else if (/(?:caution|^warning$)/i.test(header)) { return "warning"; } else { return "other"; } }