node_modules

This commit is contained in:
softprops 2019-09-09 20:03:40 +09:00
parent 722f21acbd
commit 67ba06729b
445 changed files with 83958 additions and 1 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();