updated npm modules

This commit is contained in:
2019-05-20 20:43:45 -05:00
parent 2319197b81
commit f166b72b7d
1113 changed files with 8758 additions and 12227 deletions

11
node_modules/express/lib/response.js generated vendored
View File

@@ -64,6 +64,10 @@ var charsetRegExp = /;\s*charset\s*=/;
*/
res.status = function status(code) {
if (code === undefined || code === null) {
throw new TypeError('code argument is required to res.status')
}
this.statusCode = code;
return this;
};
@@ -411,6 +415,10 @@ res.sendFile = function sendFile(path, options, callback) {
throw new TypeError('path argument is required to res.sendFile');
}
if (typeof path !== 'string') {
throw new TypeError('path must be a string to res.sendFile')
}
// support function as second arg
if (typeof options === 'function') {
done = options;
@@ -814,7 +822,7 @@ res.clearCookie = function clearCookie(name, options) {
* // "Remember Me" for 15 minutes
* res.cookie('rememberme', '1', { expires: new Date(Date.now() + 900000), httpOnly: true });
*
* // save as above
* // same as above
* res.cookie('rememberme', '1', { maxAge: 900000, httpOnly: true })
*
* @param {String} name
@@ -1127,6 +1135,7 @@ function stringify (value, replacer, spaces, escape) {
return '\\u003e'
case 0x26:
return '\\u0026'
/* istanbul ignore next: unreachable default */
default:
return c
}