forked from mirrors/action-gh-release
node_modules
This commit is contained in:
parent
722f21acbd
commit
67ba06729b
445 changed files with 83958 additions and 1 deletions
26
node_modules/mime/src/benchmark.js
generated
vendored
Normal file
26
node_modules/mime/src/benchmark.js
generated
vendored
Normal 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();
|
Loading…
Add table
Add a link
Reference in a new issue