node_modules

This commit is contained in:
softprops
2019-09-09 21:38:33 +09:00
parent 29058f2f68
commit a40b254993
445 changed files with 83959 additions and 2 deletions

26
node_modules/mime/src/benchmark.js generated vendored Normal file
View File

@@ -0,0 +1,26 @@
const Benchmark = require('benchmark');
const mime = require('..');
const mimeLite = require('../lite');
const suite = new Benchmark.Suite();
const extensions = Object.keys(mime._types);
let idx = 0;
suite
.add('mime.getType',
function() {
mime.getType(extensions[idx++]);
if (idx >= extensions.length) idx = 0;
}
)
.add('mimeLite.getType',
function() {
mimeLite.getType(extensions[idx++]);
if (idx >= extensions.length) idx = 0;
}
)
.on('cycle', function(event) {
console.log(String(event.target));
})
.run();