How to use send

Comprehensive send code examples:

How to use send.lookup:

64
65
66
67
68
69
70
71
72
73
 * @api private
 */
exports.normalizeType = function (type) {
    return ~type.indexOf('/')
        ? acceptParams(type)
        : { value: mime.lookup(type), params: {} };
};
/**
 * Normalize `types`, for example "html" becomes "text/html".
 *

How to use send.mime:

10
11
12
13
14
15
16
17
18
19
const cookie = require('cookie');
const send = require('send');
const path = require('path');
const extname = path.extname;
const resolve = path.resolve;
const mime = send.mime;
const vary = require('vary');
const isAbsolute = require('./utils').isAbsolute;
const normalizeType = require('./utils').normalizeType;
const normalizeTypes = require('./utils').normalizeTypes;