{
  "fieldDBtype": "ComputationalLinguisticsDatum",
  "_id": "application",
  "dateCreated": 1594648244934,
  "version": "v5.121.19-rc0",
  "tempId": "application",
  "stats": {
    "characters": {
      "unigrams": {
        "0": 15,
        "1": 12,
        "2": 6,
        "3": 4,
        "4": 4,
        "5": 1,
        "8": 1,
        "9": 1,
        "/": 151,
        "*": 262,
        "!": 16,
        "\n": 643,
        " ": 2460,
        "e": 1105,
        "x": 60,
        "p": 399,
        "r": 758,
        "s": 545,
        "C": 11,
        "o": 526,
        "y": 107,
        "i": 620,
        "g": 191,
        "h": 289,
        "t": 902,
        "(": 215,
        "c": 245,
        ")": 215,
        "-": 18,
        "T": 18,
        "J": 3,
        "H": 4,
        "l": 329,
        "w": 85,
        "a": 615,
        "u": 332,
        "k": 34,
        "R": 19,
        "m": 154,
        "n": 608,
        "S": 32,
        "D": 9,
        "W": 2,
        "M": 3,
        "I": 7,
        "L": 3,
        "d": 222,
        "'": 215,
        ";": 167,
        ".": 279,
        "@": 49,
        "v": 139,
        "f": 211,
        "=": 132,
        "q": 43,
        "b": 107,
        ":": 28,
        "V": 8,
        "E": 22,
        "Q": 3,
        "P": 24,
        "O": 22,
        "A": 11,
        "{": 92,
        "}": 92,
        "_": 33,
        "z": 10,
        "N": 2,
        "|": 12,
        ",": 100,
        "j": 16,
        "%": 4,
        "[": 20,
        "]": 20,
        "&": 8,
        "\\": 3,
        "`": 50,
        "#": 5,
        "B": 6,
        "F": 13,
        "\"": 34,
        "?": 3,
        "+": 15,
        "<": 2,
        ">": 7,
        "U": 1
      },
      "bigrams": {}
    },
    "words": {
      "unigrams": {
        "1": 1,
        "2013": 1,
        "/*!": 1,
        "*": 188,
        "express": 3,
        "Copyright(c)": 3,
        "2009-2013": 1,
        "TJ": 1,
        "Holowaychuk": 1,
        "Roman": 1,
        "Shtylman": 1,
        "2014-2015": 1,
        "Douglas": 1,
        "Christopher": 1,
        "Wilson": 1,
        "MIT": 1,
        "Licensed": 1,
        "*/": 25,
        "'use": 1,
        "strict';": 1,
        "/**": 23,
        "Module": 1,
        "dependencies.": 1,
        "@private": 9,
        "var": 43,
        "finalhandler": 1,
        "=": 89,
        "require('finalhandler');": 1,
        "Router": 1,
        "require('./router');": 1,
        "methods": 2,
        "require('methods');": 1,
        "middleware": 5,
        "require('./middleware/init');": 1,
        "query": 1,
        "require('./middleware/query');": 1,
        "debug": 1,
        "require('debug')('express:application');": 1,
        "View": 2,
        "require('./view');": 1,
        "http": 2,
        "require('http');": 1,
        "compileETag": 1,
        "require('./utils').compileETag;": 1,
        "compileQueryParser": 1,
        "require('./utils').compileQueryParser;": 1,
        "compileTrust": 1,
        "require('./utils').compileTrust;": 1,
        "deprecate": 1,
        "require('depd')('express');": 1,
        "flatten": 1,
        "require('array-flatten');": 1,
        "merge": 4,
        "require('utils-merge');": 1,
        "resolve": 1,
        "require('path').resolve;": 1,
        "setPrototypeOf": 1,
        "require('setprototypeof')": 1,
        "slice": 1,
        "Array.prototype.slice;": 1,
        "Application": 1,
        "prototype.": 1,
        "app": 9,
        "exports": 1,
        "module.exports": 1,
        "{};": 6,
        "Variable": 1,
        "for": 16,
        "trust": 4,
        "proxy": 7,
        "inheritance": 1,
        "back-compat": 3,
        "trustProxyDefaultSymbol": 1,
        "'@@symbol:trust_proxy_default';": 1,
        "Initialize": 2,
        "the": 34,
        "server.": 1,
        "-": 4,
        "setup": 5,
        "default": 8,
        "configuration": 2,
        "route": 4,
        "reflection": 1,
        "app.init": 1,
        "function": 24,
        "init()": 1,
        "{": 55,
        "this.cache": 1,
        "this.engines": 1,
        "this.settings": 1,
        "this.defaultConfiguration();": 1,
        "};": 18,
        "application": 3,
        "configuration.": 1,
        "app.defaultConfiguration": 1,
        "defaultConfiguration()": 1,
        "env": 1,
        "process.env.NODE_ENV": 1,
        "||": 5,
        "'development';": 1,
        "//": 40,
        "settings": 3,
        "this.enable('x-powered-by');": 1,
        "this.set('etag',": 1,
        "'weak');": 1,
        "this.set('env',": 1,
        "env);": 2,
        "this.set('query": 2,
        "parser',": 1,
        "'extended');": 1,
        "this.set('subdomain": 1,
        "offset',": 1,
        "2);": 1,
        "this.set('trust": 2,
        "proxy',": 1,
        "false);": 2,
        "inherit": 5,
        "Object.defineProperty(this.settings,": 2,
        "trustProxyDefaultSymbol,": 2,
        "configurable:": 2,
        "true,": 2,
        "value:": 2,
        "true": 4,
        "});": 10,
        "debug('booting": 1,
        "in": 4,
        "%s": 1,
        "mode',": 1,
        "this.on('mount',": 1,
        "onmount(parent)": 1,
        "if": 27,
        "(this.settings[trustProxyDefaultSymbol]": 1,
        "===": 8,
        "&&": 4,
        "typeof": 1,
        "parent.settings['trust": 1,
        "fn']": 1,
        "'function')": 5,
        "delete": 3,
        "this.settings['trust": 2,
        "proxy'];": 1,
        "fn'];": 1,
        "}": 28,
        "protos": 1,
        "setPrototypeOf(this.request,": 1,
        "parent.request)": 1,
        "setPrototypeOf(this.response,": 1,
        "parent.response)": 1,
        "setPrototypeOf(this.engines,": 1,
        "parent.engines)": 1,
        "setPrototypeOf(this.settings,": 1,
        "parent.settings)": 1,
        "locals": 2,
        "this.locals": 1,
        "Object.create(null);": 1,
        "top-most": 1,
        "is": 9,
        "mounted": 6,
        "at": 2,
        "/": 1,
        "this.mountpath": 2,
        "'/';": 2,
        "this.locals.settings": 1,
        "this.settings;": 1,
        "this.set('view',": 1,
        "View);": 1,
        "this.set('views',": 1,
        "resolve('views'));": 1,
        "this.set('jsonp": 1,
        "callback": 8,
        "name',": 1,
        "'callback');": 1,
        "(env": 1,
        "'production')": 1,
        "this.enable('view": 1,
        "cache');": 2,
        "Object.defineProperty(this,": 1,
        "'router',": 1,
        "get:": 1,
        "function()": 1,
        "throw": 3,
        "new": 7,
        "Error('\\'app.router\\'": 1,
        "deprecated!\\nPlease": 1,
        "see": 1,
        "3.x": 1,
        "to": 21,
        "4.x": 1,
        "migration": 1,
        "guide": 1,
        "details": 1,
        "on": 5,
        "how": 1,
        "update": 1,
        "your": 1,
        "app.');": 1,
        "lazily": 1,
        "adds": 1,
        "base": 2,
        "router": 5,
        "it": 4,
        "has": 2,
        "not": 3,
        "yet": 1,
        "been": 1,
        "added.": 1,
        "We": 1,
        "cannot": 1,
        "add": 2,
        "defaultConfiguration": 1,
        "because": 1,
        "reads": 1,
        "which": 2,
        "might": 1,
        "be": 4,
        "set": 3,
        "after": 1,
        "that": 5,
        "run.": 1,
        "app.lazyrouter": 1,
        "lazyrouter()": 1,
        "(!this._router)": 1,
        "this._router": 1,
        "Router({": 1,
        "caseSensitive:": 1,
        "this.enabled('case": 1,
        "sensitive": 1,
        "routing'),": 1,
        "strict:": 1,
        "this.enabled('strict": 1,
        "routing')": 1,
        "this._router.use(query(this.get('query": 1,
        "parser": 2,
        "fn')));": 1,
        "this._router.use(middleware.init(this));": 1,
        "Dispatch": 1,
        "a": 8,
        "req,": 1,
        "res": 2,
        "pair": 1,
        "into": 1,
        "application.": 1,
        "Starts": 1,
        "pipeline": 1,
        "processing.": 1,
        "If": 3,
        "no": 2,
        "provided,": 1,
        "then": 3,
        "error": 4,
        "handlers": 1,
        "will": 4,
        "respond": 1,
        "event": 1,
        "of": 4,
        "an": 6,
        "bubbling": 1,
        "through": 1,
        "stack.": 1,
        "app.handle": 1,
        "handle(req,": 1,
        "res,": 5,
        "callback)": 3,
        "this._router;": 2,
        "final": 1,
        "handler": 1,
        "done": 3,
        "finalhandler(req,": 1,
        "env:": 1,
        "this.get('env'),": 1,
        "onerror:": 1,
        "logerror.bind(this)": 1,
        "routes": 2,
        "(!router)": 1,
        "debug('no": 1,
        "defined": 1,
        "app');": 1,
        "done();": 1,
        "return;": 1,
        "router.handle(req,": 1,
        "done);": 2,
        "Proxy": 3,
        "`Router#use()`": 1,
        "router.": 1,
        "See": 3,
        "Router#use()": 1,
        "documentation": 1,
        "details.": 3,
        "_fn_": 1,
        "parameter": 2,
        "app,": 1,
        "_route_": 1,
        "specified.": 1,
        "@public": 12,
        "app.use": 1,
        "use(fn)": 1,
        "offset": 2,
        "0;": 3,
        "path": 5,
        "'/'": 1,
        "disambiguate": 1,
        "app.use([fn])": 1,
        "(typeof": 4,
        "fn": 5,
        "!==": 6,
        "arg": 5,
        "fn;": 3,
        "while": 1,
        "(Array.isArray(arg)": 1,
        "arg.length": 1,
        "0)": 2,
        "arg[0];": 1,
        "first": 1,
        "1;": 1,
        "fns": 1,
        "flatten(slice.call(arguments,": 1,
        "offset));": 1,
        "(fns.length": 1,
        "TypeError('app.use()": 1,
        "requires": 1,
        "functions');": 1,
        "this.lazyrouter();": 5,
        "fns.forEach(function": 1,
        "(fn)": 1,
        "non-express": 1,
        "(!fn": 1,
        "!fn.handle": 1,
        "!fn.set)": 1,
        "return": 20,
        "router.use(path,": 2,
        "fn);": 3,
        "debug('.use": 1,
        "under": 1,
        "%s',": 1,
        "path);": 1,
        "fn.mountpath": 1,
        "path;": 1,
        "fn.parent": 1,
        "this;": 8,
        "restore": 1,
        ".app": 1,
        "property": 1,
        "req": 1,
        "and": 6,
        "mounted_app(req,": 1,
        "next)": 1,
        "orig": 1,
        "req.app;": 1,
        "fn.handle(req,": 1,
        "(err)": 2,
        "setPrototypeOf(req,": 1,
        "orig.request)": 1,
        "setPrototypeOf(res,": 1,
        "orig.response)": 1,
        "next(err);": 1,
        "fn.emit('mount',": 1,
        "this);": 2,
        "},": 3,
        "`Router#route()`": 1,
        "Returns": 1,
        "`Route`": 1,
        "instance": 1,
        "_path_.": 1,
        "Routes": 1,
        "are": 1,
        "isolated": 1,
        "stacks": 1,
        "specific": 1,
        "paths.": 1,
        "Route": 1,
        "api": 2,
        "docs": 2,
        "app.route": 1,
        "route(path)": 1,
        "this._router.route(path);": 3,
        "Register": 1,
        "given": 3,
        "template": 6,
        "engine": 5,
        "`fn`": 1,
        "as": 7,
        "`ext`.": 1,
        "By": 1,
        "`require()`": 1,
        "based": 2,
        "file": 3,
        "extension.": 1,
        "For": 4,
        "example": 3,
        "you": 6,
        "try": 2,
        "render": 2,
        "\"foo.ejs\"": 1,
        "Express": 2,
        "invoke": 1,
        "following": 1,
        "internally:": 1,
        "app.engine('ejs',": 1,
        "require('ejs').__express);": 1,
        "engines": 5,
        "do": 4,
        "provide": 1,
        "`.__express`": 1,
        "out": 1,
        "box,": 1,
        "or": 4,
        "wish": 2,
        "\"map\"": 1,
        "different": 1,
        "extension": 3,
        "may": 2,
        "use": 1,
        "this": 6,
        "method.": 2,
        "mapping": 1,
        "EJS": 2,
        "\".html\"": 1,
        "files:": 1,
        "app.engine('html',": 1,
        "require('ejs').renderFile);": 1,
        "In": 1,
        "case": 4,
        "provides": 1,
        "`.renderFile()`": 1,
        "method": 2,
        "with": 5,
        "same": 1,
        "signature": 1,
        "expects:": 1,
        "`(path,": 1,
        "options,": 3,
        "callback)`,": 1,
        "though": 1,
        "note": 1,
        "aliases": 1,
        "`ejs.__express`": 1,
        "internally": 1,
        "so": 2,
        "you're": 1,
        "using": 2,
        "\".ejs\"": 1,
        "extensions": 1,
        "dont": 1,
        "need": 1,
        "anything.": 1,
        "Some": 1,
        "follow": 2,
        "convention,": 2,
        "[Consolidate.js](https://github.com/tj/consolidate.js)": 1,
        "library": 1,
        "was": 3,
        "created": 1,
        "map": 1,
        "all": 1,
        "node's": 1,
        "popular": 1,
        "thus": 1,
        "allowing": 1,
        "them": 1,
        "work": 1,
        "seamlessly": 1,
        "within": 1,
        "Express.": 1,
        "@param": 16,
        "{String}": 9,
        "ext": 2,
        "{Function}": 4,
        "@return": 10,
        "{app}": 5,
        "chaining": 6,
        "app.engine": 1,
        "engine(ext,": 1,
        "fn)": 2,
        "Error('callback": 1,
        "required');": 1,
        "get": 1,
        "ext[0]": 1,
        "'.'": 2,
        "?": 3,
        "+": 11,
        ":": 3,
        "ext;": 1,
        "store": 1,
        "this.engines[extension]": 1,
        "`Router#param()`": 1,
        "one": 1,
        "added": 1,
        "feature.": 1,
        "The": 1,
        "_name_": 1,
        "can": 1,
        "array": 1,
        "names.": 1,
        "Router#param()": 1,
        "more": 1,
        "{String|Array}": 1,
        "name": 4,
        "app.param": 1,
        "param(name,": 1,
        "(Array.isArray(name))": 1,
        "(var": 2,
        "i": 4,
        "<": 2,
        "name.length;": 1,
        "i++)": 2,
        "this.param(name[i],": 1,
        "this._router.param(name,": 1,
        "Assign": 1,
        "`setting`": 3,
        "`val`,": 1,
        "`setting`'s": 1,
        "value.": 1,
        "app.set('foo',": 1,
        "'bar');": 1,
        "app.get('foo');": 1,
        "=>": 5,
        "\"bar\"": 1,
        "Mounted": 1,
        "servers": 1,
        "their": 1,
        "parent": 1,
        "server's": 1,
        "settings.": 1,
        "setting": 5,
        "{*}": 1,
        "[val]": 1,
        "{Server}": 1,
        "app.set": 1,
        "set(setting,": 1,
        "val)": 1,
        "(arguments.length": 1,
        "1)": 2,
        "app.get(setting)": 2,
        "this.settings[setting];": 1,
        "debug('set": 1,
        "\"%s\"": 1,
        "%o',": 1,
        "setting,": 1,
        "val);": 1,
        "value": 2,
        "this.settings[setting]": 1,
        "val;": 1,
        "trigger": 1,
        "matched": 1,
        "switch": 1,
        "(setting)": 1,
        "'etag':": 1,
        "this.set('etag": 1,
        "fn',": 3,
        "compileETag(val));": 1,
        "break;": 3,
        "'query": 1,
        "parser':": 1,
        "compileQueryParser(val));": 1,
        "'trust": 1,
        "proxy':": 1,
        "compileTrust(val));": 1,
        "false": 3,
        "Return": 1,
        "app's": 1,
        "absolute": 1,
        "pathname": 1,
        "parent(s)": 1,
        "have": 1,
        "it.": 1,
        "\"/admin\",": 1,
        "itself": 1,
        "\"/blog\"": 1,
        "would": 1,
        "\"/blog/admin\".": 1,
        "app.path": 1,
        "path()": 1,
        "this.parent": 1,
        "this.parent.path()": 1,
        "'';": 1,
        "Check": 2,
        "enabled": 1,
        "(truthy).": 1,
        "app.enabled('foo')": 2,
        "app.enable('foo')": 2,
        "{Boolean}": 2,
        "app.enabled": 1,
        "enabled(setting)": 1,
        "Boolean(this.set(setting));": 1,
        "disabled.": 1,
        "app.disabled('foo')": 2,
        "app.disabled": 1,
        "disabled(setting)": 1,
        "!this.set(setting);": 1,
        "Enable": 1,
        "`setting`.": 2,
        "app.enable": 1,
        "enable(setting)": 1,
        "this.set(setting,": 2,
        "true);": 1,
        "Disable": 1,
        "app.disable": 1,
        "disable(setting)": 1,
        "Delegate": 1,
        "`.VERB(...)`": 1,
        "calls": 1,
        "`router.VERB(...)`.": 1,
        "methods.forEach(function(method){": 1,
        "app[method]": 1,
        "function(path){": 1,
        "(method": 1,
        "'get'": 1,
        "arguments.length": 1,
        "this.set(path);": 1,
        "route[method].apply(route,": 1,
        "slice.call(arguments,": 2,
        "1));": 1,
        "Special-cased": 1,
        "\"all\"": 1,
        "method,": 1,
        "applying": 1,
        "`path`,": 1,
        "middleware,": 1,
        "_every_": 1,
        "HTTP": 2,
        "...": 3,
        "app.all": 1,
        "all(path)": 1,
        "args": 1,
        "1);": 1,
        "methods.length;": 1,
        "route[methods[i]].apply(route,": 1,
        "args);": 1,
        "del": 1,
        "->": 1,
        "alias": 1,
        "app.del": 1,
        "deprecate.function(app.delete,": 1,
        "'app.del:": 1,
        "Use": 1,
        "app.delete": 1,
        "instead');": 1,
        "Render": 1,
        "view": 5,
        "`name`": 1,
        "`options`": 1,
        "accepting": 1,
        "rendered": 1,
        "string.": 1,
        "Example:": 1,
        "app.render('email',": 1,
        "name:": 1,
        "'Tobi'": 1,
        "function(err,": 1,
        "html){": 1,
        "})": 1,
        "{Object|Function}": 1,
        "options": 3,
        "app.render": 1,
        "render(name,": 1,
        "cache": 3,
        "this.cache;": 1,
        "callback;": 1,
        "this.engines;": 1,
        "opts": 2,
        "options;": 2,
        "renderOptions": 1,
        "view;": 3,
        "support": 1,
        "second": 1,
        "app.locals": 1,
        "merge(renderOptions,": 3,
        "this.locals);": 1,
        "options._locals": 1,
        "(opts._locals)": 1,
        "opts._locals);": 1,
        "opts);": 1,
        ".cache": 1,
        "unless": 1,
        "explicitly": 1,
        "provided": 1,
        "(renderOptions.cache": 1,
        "==": 1,
        "null)": 1,
        "renderOptions.cache": 1,
        "this.enabled('view": 1,
        "primed": 1,
        "(renderOptions.cache)": 2,
        "cache[name];": 1,
        "(!view)": 1,
        "this.get('view');": 1,
        "View(name,": 1,
        "defaultEngine:": 1,
        "this.get('view": 1,
        "engine'),": 1,
        "root:": 1,
        "this.get('views'),": 1,
        "engines:": 1,
        "(!view.path)": 1,
        "dirs": 1,
        "Array.isArray(view.root)": 1,
        "view.root.length": 1,
        ">": 1,
        "'directories": 1,
        "\"'": 4,
        "view.root.slice(0,": 1,
        "-1).join('\",": 1,
        "\"')": 1,
        "'\"": 2,
        "view.root[view.root.length": 1,
        "1]": 1,
        "'\"'": 2,
        "'directory": 1,
        "view.root": 1,
        "err": 2,
        "Error('Failed": 1,
        "lookup": 1,
        "views": 1,
        "'": 1,
        "dirs);": 1,
        "err.view": 1,
        "done(err);": 1,
        "prime": 1,
        "cache[name]": 1,
        "tryRender(view,": 2,
        "renderOptions,": 1,
        "Listen": 1,
        "connections.": 1,
        "A": 1,
        "node": 1,
        "`http.Server`": 1,
        "returned,": 1,
        "(which": 1,
        "`Function`)": 1,
        "its": 1,
        "callback.": 1,
        "create": 1,
        "both": 1,
        "HTTPS": 1,
        "server": 2,
        "\"http\"": 1,
        "\"https\"": 1,
        "modules": 1,
        "shown": 1,
        "here:": 1,
        "require('http')": 1,
        ",": 3,
        "https": 1,
        "require('https')": 1,
        "require('express')": 1,
        "express();": 1,
        "http.createServer(app).listen(80);": 1,
        "https.createServer({": 1,
        "app).listen(443);": 1,
        "{http.Server}": 1,
        "app.listen": 1,
        "listen()": 1,
        "http.createServer(this);": 1,
        "server.listen.apply(server,": 1,
        "arguments);": 1,
        "Log": 1,
        "console.error.": 1,
        "{Error}": 1,
        "logerror(err)": 1,
        "/*": 1,
        "istanbul": 1,
        "ignore": 1,
        "next": 1,
        "(this.get('env')": 1,
        "'test')": 1,
        "console.error(err.stack": 1,
        "err.toString());": 1,
        "Try": 1,
        "rendering": 1,
        "view.": 1,
        "view.render(options,": 1,
        "callback);": 1,
        "catch": 1,
        "callback(err);": 1
      },
      "bigrams": {}
    },
    "tokens": {
      "characters": {
        "unigrams": 14269,
        "bigrams": {}
      },
      "words": {
        "unigrams": 1892,
        "bigrams": {}
      }
    },
    "types": {
      "characters": 86,
      "words": 774
    }
  },
  "api": "datums",
  "datumFields": [
    {
      "fieldDBtype": "DatumField",
      "id": "orthography",
      "type": "DatumField",
      "version": "v5.121.19-rc0",
      "labelFieldLinguists": "Orthography",
      "value": "/*!\n * express\n * Copyright(c) 2009-2013 TJ Holowaychuk\n * Copyright(c) 2013 Roman Shtylman\n * Copyright(c) 2014-2015 Douglas Christopher Wilson\n * MIT Licensed\n */\n\n'use strict';\n\n/**\n * Module dependencies.\n * @private\n */\n\nvar finalhandler = require('finalhandler');\nvar Router = require('./router');\nvar methods = require('methods');\nvar middleware = require('./middleware/init');\nvar query = require('./middleware/query');\nvar debug = require('debug')('express:application');\nvar View = require('./view');\nvar http = require('http');\nvar compileETag = require('./utils').compileETag;\nvar compileQueryParser = require('./utils').compileQueryParser;\nvar compileTrust = require('./utils').compileTrust;\nvar deprecate = require('depd')('express');\nvar flatten = require('array-flatten');\nvar merge = require('utils-merge');\nvar resolve = require('path').resolve;\nvar setPrototypeOf = require('setprototypeof')\nvar slice = Array.prototype.slice;\n\n/**\n * Application prototype.\n */\n\nvar app = exports = module.exports = {};\n\n/**\n * Variable for trust proxy inheritance back-compat\n * @private\n */\n\nvar trustProxyDefaultSymbol = '@@symbol:trust_proxy_default';\n\n/**\n * Initialize the server.\n *\n *   - setup default configuration\n *   - setup default middleware\n *   - setup route reflection methods\n *\n * @private\n */\n\napp.init = function init() {\n  this.cache = {};\n  this.engines = {};\n  this.settings = {};\n\n  this.defaultConfiguration();\n};\n\n/**\n * Initialize application configuration.\n * @private\n */\n\napp.defaultConfiguration = function defaultConfiguration() {\n  var env = process.env.NODE_ENV || 'development';\n\n  // default settings\n  this.enable('x-powered-by');\n  this.set('etag', 'weak');\n  this.set('env', env);\n  this.set('query parser', 'extended');\n  this.set('subdomain offset', 2);\n  this.set('trust proxy', false);\n\n  // trust proxy inherit back-compat\n  Object.defineProperty(this.settings, trustProxyDefaultSymbol, {\n    configurable: true,\n    value: true\n  });\n\n  debug('booting in %s mode', env);\n\n  this.on('mount', function onmount(parent) {\n    // inherit trust proxy\n    if (this.settings[trustProxyDefaultSymbol] === true\n      && typeof parent.settings['trust proxy fn'] === 'function') {\n      delete this.settings['trust proxy'];\n      delete this.settings['trust proxy fn'];\n    }\n\n    // inherit protos\n    setPrototypeOf(this.request, parent.request)\n    setPrototypeOf(this.response, parent.response)\n    setPrototypeOf(this.engines, parent.engines)\n    setPrototypeOf(this.settings, parent.settings)\n  });\n\n  // setup locals\n  this.locals = Object.create(null);\n\n  // top-most app is mounted at /\n  this.mountpath = '/';\n\n  // default locals\n  this.locals.settings = this.settings;\n\n  // default configuration\n  this.set('view', View);\n  this.set('views', resolve('views'));\n  this.set('jsonp callback name', 'callback');\n\n  if (env === 'production') {\n    this.enable('view cache');\n  }\n\n  Object.defineProperty(this, 'router', {\n    get: function() {\n      throw new Error('\\'app.router\\' is deprecated!\\nPlease see the 3.x to 4.x migration guide for details on how to update your app.');\n    }\n  });\n};\n\n/**\n * lazily adds the base router if it has not yet been added.\n *\n * We cannot add the base router in the defaultConfiguration because\n * it reads app settings which might be set after that has run.\n *\n * @private\n */\napp.lazyrouter = function lazyrouter() {\n  if (!this._router) {\n    this._router = new Router({\n      caseSensitive: this.enabled('case sensitive routing'),\n      strict: this.enabled('strict routing')\n    });\n\n    this._router.use(query(this.get('query parser fn')));\n    this._router.use(middleware.init(this));\n  }\n};\n\n/**\n * Dispatch a req, res pair into the application. Starts pipeline processing.\n *\n * If no callback is provided, then default error handlers will respond\n * in the event of an error bubbling through the stack.\n *\n * @private\n */\n\napp.handle = function handle(req, res, callback) {\n  var router = this._router;\n\n  // final handler\n  var done = callback || finalhandler(req, res, {\n    env: this.get('env'),\n    onerror: logerror.bind(this)\n  });\n\n  // no routes\n  if (!router) {\n    debug('no routes defined on app');\n    done();\n    return;\n  }\n\n  router.handle(req, res, done);\n};\n\n/**\n * Proxy `Router#use()` to add middleware to the app router.\n * See Router#use() documentation for details.\n *\n * If the _fn_ parameter is an express app, then it will be\n * mounted at the _route_ specified.\n *\n * @public\n */\n\napp.use = function use(fn) {\n  var offset = 0;\n  var path = '/';\n\n  // default path to '/'\n  // disambiguate app.use([fn])\n  if (typeof fn !== 'function') {\n    var arg = fn;\n\n    while (Array.isArray(arg) && arg.length !== 0) {\n      arg = arg[0];\n    }\n\n    // first arg is the path\n    if (typeof arg !== 'function') {\n      offset = 1;\n      path = fn;\n    }\n  }\n\n  var fns = flatten(slice.call(arguments, offset));\n\n  if (fns.length === 0) {\n    throw new TypeError('app.use() requires middleware functions');\n  }\n\n  // setup router\n  this.lazyrouter();\n  var router = this._router;\n\n  fns.forEach(function (fn) {\n    // non-express app\n    if (!fn || !fn.handle || !fn.set) {\n      return router.use(path, fn);\n    }\n\n    debug('.use app under %s', path);\n    fn.mountpath = path;\n    fn.parent = this;\n\n    // restore .app property on req and res\n    router.use(path, function mounted_app(req, res, next) {\n      var orig = req.app;\n      fn.handle(req, res, function (err) {\n        setPrototypeOf(req, orig.request)\n        setPrototypeOf(res, orig.response)\n        next(err);\n      });\n    });\n\n    // mounted an app\n    fn.emit('mount', this);\n  }, this);\n\n  return this;\n};\n\n/**\n * Proxy to the app `Router#route()`\n * Returns a new `Route` instance for the _path_.\n *\n * Routes are isolated middleware stacks for specific paths.\n * See the Route api docs for details.\n *\n * @public\n */\n\napp.route = function route(path) {\n  this.lazyrouter();\n  return this._router.route(path);\n};\n\n/**\n * Register the given template engine callback `fn`\n * as `ext`.\n *\n * By default will `require()` the engine based on the\n * file extension. For example if you try to render\n * a \"foo.ejs\" file Express will invoke the following internally:\n *\n *     app.engine('ejs', require('ejs').__express);\n *\n * For engines that do not provide `.__express` out of the box,\n * or if you wish to \"map\" a different extension to the template engine\n * you may use this method. For example mapping the EJS template engine to\n * \".html\" files:\n *\n *     app.engine('html', require('ejs').renderFile);\n *\n * In this case EJS provides a `.renderFile()` method with\n * the same signature that Express expects: `(path, options, callback)`,\n * though note that it aliases this method as `ejs.__express` internally\n * so if you're using \".ejs\" extensions you dont need to do anything.\n *\n * Some template engines do not follow this convention, the\n * [Consolidate.js](https://github.com/tj/consolidate.js)\n * library was created to map all of node's popular template\n * engines to follow this convention, thus allowing them to\n * work seamlessly within Express.\n *\n * @param {String} ext\n * @param {Function} fn\n * @return {app} for chaining\n * @public\n */\n\napp.engine = function engine(ext, fn) {\n  if (typeof fn !== 'function') {\n    throw new Error('callback function required');\n  }\n\n  // get file extension\n  var extension = ext[0] !== '.'\n    ? '.' + ext\n    : ext;\n\n  // store engine\n  this.engines[extension] = fn;\n\n  return this;\n};\n\n/**\n * Proxy to `Router#param()` with one added api feature. The _name_ parameter\n * can be an array of names.\n *\n * See the Router#param() docs for more details.\n *\n * @param {String|Array} name\n * @param {Function} fn\n * @return {app} for chaining\n * @public\n */\n\napp.param = function param(name, fn) {\n  this.lazyrouter();\n\n  if (Array.isArray(name)) {\n    for (var i = 0; i < name.length; i++) {\n      this.param(name[i], fn);\n    }\n\n    return this;\n  }\n\n  this._router.param(name, fn);\n\n  return this;\n};\n\n/**\n * Assign `setting` to `val`, or return `setting`'s value.\n *\n *    app.set('foo', 'bar');\n *    app.get('foo');\n *    // => \"bar\"\n *\n * Mounted servers inherit their parent server's settings.\n *\n * @param {String} setting\n * @param {*} [val]\n * @return {Server} for chaining\n * @public\n */\n\napp.set = function set(setting, val) {\n  if (arguments.length === 1) {\n    // app.get(setting)\n    return this.settings[setting];\n  }\n\n  debug('set \"%s\" to %o', setting, val);\n\n  // set value\n  this.settings[setting] = val;\n\n  // trigger matched settings\n  switch (setting) {\n    case 'etag':\n      this.set('etag fn', compileETag(val));\n      break;\n    case 'query parser':\n      this.set('query parser fn', compileQueryParser(val));\n      break;\n    case 'trust proxy':\n      this.set('trust proxy fn', compileTrust(val));\n\n      // trust proxy inherit back-compat\n      Object.defineProperty(this.settings, trustProxyDefaultSymbol, {\n        configurable: true,\n        value: false\n      });\n\n      break;\n  }\n\n  return this;\n};\n\n/**\n * Return the app's absolute pathname\n * based on the parent(s) that have\n * mounted it.\n *\n * For example if the application was\n * mounted as \"/admin\", which itself\n * was mounted as \"/blog\" then the\n * return value would be \"/blog/admin\".\n *\n * @return {String}\n * @private\n */\n\napp.path = function path() {\n  return this.parent\n    ? this.parent.path() + this.mountpath\n    : '';\n};\n\n/**\n * Check if `setting` is enabled (truthy).\n *\n *    app.enabled('foo')\n *    // => false\n *\n *    app.enable('foo')\n *    app.enabled('foo')\n *    // => true\n *\n * @param {String} setting\n * @return {Boolean}\n * @public\n */\n\napp.enabled = function enabled(setting) {\n  return Boolean(this.set(setting));\n};\n\n/**\n * Check if `setting` is disabled.\n *\n *    app.disabled('foo')\n *    // => true\n *\n *    app.enable('foo')\n *    app.disabled('foo')\n *    // => false\n *\n * @param {String} setting\n * @return {Boolean}\n * @public\n */\n\napp.disabled = function disabled(setting) {\n  return !this.set(setting);\n};\n\n/**\n * Enable `setting`.\n *\n * @param {String} setting\n * @return {app} for chaining\n * @public\n */\n\napp.enable = function enable(setting) {\n  return this.set(setting, true);\n};\n\n/**\n * Disable `setting`.\n *\n * @param {String} setting\n * @return {app} for chaining\n * @public\n */\n\napp.disable = function disable(setting) {\n  return this.set(setting, false);\n};\n\n/**\n * Delegate `.VERB(...)` calls to `router.VERB(...)`.\n */\n\nmethods.forEach(function(method){\n  app[method] = function(path){\n    if (method === 'get' && arguments.length === 1) {\n      // app.get(setting)\n      return this.set(path);\n    }\n\n    this.lazyrouter();\n\n    var route = this._router.route(path);\n    route[method].apply(route, slice.call(arguments, 1));\n    return this;\n  };\n});\n\n/**\n * Special-cased \"all\" method, applying the given route `path`,\n * middleware, and callback to _every_ HTTP method.\n *\n * @param {String} path\n * @param {Function} ...\n * @return {app} for chaining\n * @public\n */\n\napp.all = function all(path) {\n  this.lazyrouter();\n\n  var route = this._router.route(path);\n  var args = slice.call(arguments, 1);\n\n  for (var i = 0; i < methods.length; i++) {\n    route[methods[i]].apply(route, args);\n  }\n\n  return this;\n};\n\n// del -> delete alias\n\napp.del = deprecate.function(app.delete, 'app.del: Use app.delete instead');\n\n/**\n * Render the given view `name` name with `options`\n * and a callback accepting an error and the\n * rendered template string.\n *\n * Example:\n *\n *    app.render('email', { name: 'Tobi' }, function(err, html){\n *      // ...\n *    })\n *\n * @param {String} name\n * @param {Object|Function} options or fn\n * @param {Function} callback\n * @public\n */\n\napp.render = function render(name, options, callback) {\n  var cache = this.cache;\n  var done = callback;\n  var engines = this.engines;\n  var opts = options;\n  var renderOptions = {};\n  var view;\n\n  // support callback function as second arg\n  if (typeof options === 'function') {\n    done = options;\n    opts = {};\n  }\n\n  // merge app.locals\n  merge(renderOptions, this.locals);\n\n  // merge options._locals\n  if (opts._locals) {\n    merge(renderOptions, opts._locals);\n  }\n\n  // merge options\n  merge(renderOptions, opts);\n\n  // set .cache unless explicitly provided\n  if (renderOptions.cache == null) {\n    renderOptions.cache = this.enabled('view cache');\n  }\n\n  // primed cache\n  if (renderOptions.cache) {\n    view = cache[name];\n  }\n\n  // view\n  if (!view) {\n    var View = this.get('view');\n\n    view = new View(name, {\n      defaultEngine: this.get('view engine'),\n      root: this.get('views'),\n      engines: engines\n    });\n\n    if (!view.path) {\n      var dirs = Array.isArray(view.root) && view.root.length > 1\n        ? 'directories \"' + view.root.slice(0, -1).join('\", \"') + '\" or \"' + view.root[view.root.length - 1] + '\"'\n        : 'directory \"' + view.root + '\"'\n      var err = new Error('Failed to lookup view \"' + name + '\" in views ' + dirs);\n      err.view = view;\n      return done(err);\n    }\n\n    // prime the cache\n    if (renderOptions.cache) {\n      cache[name] = view;\n    }\n  }\n\n  // render\n  tryRender(view, renderOptions, done);\n};\n\n/**\n * Listen for connections.\n *\n * A node `http.Server` is returned, with this\n * application (which is a `Function`) as its\n * callback. If you wish to create both an HTTP\n * and HTTPS server you may do so with the \"http\"\n * and \"https\" modules as shown here:\n *\n *    var http = require('http')\n *      , https = require('https')\n *      , express = require('express')\n *      , app = express();\n *\n *    http.createServer(app).listen(80);\n *    https.createServer({ ... }, app).listen(443);\n *\n * @return {http.Server}\n * @public\n */\n\napp.listen = function listen() {\n  var server = http.createServer(this);\n  return server.listen.apply(server, arguments);\n};\n\n/**\n * Log error using console.error.\n *\n * @param {Error} err\n * @private\n */\n\nfunction logerror(err) {\n  /* istanbul ignore next */\n  if (this.get('env') !== 'test') console.error(err.stack || err.toString());\n}\n\n/**\n * Try rendering a view.\n * @private\n */\n\nfunction tryRender(view, options, callback) {\n  try {\n    view.render(options, callback);\n  } catch (err) {\n    callback(err);\n  }\n}",
      "label": "orthography"
    }
  ],
  "audioVideo": [],
  "comments": []
}