UNPKG

261 BJavaScriptView Raw
1'use strict';
2
3var typeHandlers = require('./types');
4
5module.exports = function (buffer, filepath) {
6 var type, result;
7 for (type in typeHandlers) {
8 result = typeHandlers[type].detect(buffer, filepath);
9 if (result) {
10 return type;
11 }
12 }
13};