1
0
mirror of https://github.com/mgerb/mywebsite synced 2026-01-13 03:02:49 +00:00

updated bunch of file paths and changed the way posts are loaded

This commit is contained in:
2016-01-05 12:28:04 -06:00
parent 719ae331ae
commit c96a84d0ff
13249 changed files with 317868 additions and 2101398 deletions

90
node_modules/express/lib/request.js generated vendored
View File

@@ -1,5 +1,16 @@
/*!
* express
* Copyright(c) 2009-2013 TJ Holowaychuk
* Copyright(c) 2013 Roman Shtylman
* Copyright(c) 2014-2015 Douglas Christopher Wilson
* MIT Licensed
*/
'use strict';
/**
* Module dependencies.
* @private
*/
var accepts = require('accepts');
@@ -41,18 +52,20 @@ var req = exports = module.exports = {
*
* @param {String} name
* @return {String}
* @api public
* @public
*/
req.get =
req.header = function(name){
switch (name = name.toLowerCase()) {
req.header = function header(name) {
var lc = name.toLowerCase();
switch (lc) {
case 'referer':
case 'referrer':
return this.headers.referrer
|| this.headers.referer;
default:
return this.headers[name];
return this.headers[lc];
}
};
@@ -98,8 +111,8 @@ req.header = function(name){
* // => "json"
*
* @param {String|Array} type(s)
* @return {String}
* @api public
* @return {String|Array|Boolean}
* @public
*/
req.accepts = function(){
@@ -111,8 +124,8 @@ req.accepts = function(){
* Check if the given `encoding`s are accepted.
*
* @param {String} ...encoding
* @return {Boolean}
* @api public
* @return {String|Array}
* @public
*/
req.acceptsEncodings = function(){
@@ -128,8 +141,8 @@ req.acceptsEncoding = deprecate.function(req.acceptsEncodings,
* otherwise you should respond with 406 "Not Acceptable".
*
* @param {String} ...charset
* @return {Boolean}
* @api public
* @return {String|Array}
* @public
*/
req.acceptsCharsets = function(){
@@ -145,8 +158,8 @@ req.acceptsCharset = deprecate.function(req.acceptsCharsets,
* otherwise you should respond with 406 "Not Acceptable".
*
* @param {String} ...lang
* @return {Boolean}
* @api public
* @return {String|Array}
* @public
*/
req.acceptsLanguages = function(){
@@ -174,7 +187,7 @@ req.acceptsLanguage = deprecate.function(req.acceptsLanguages,
*
* @param {Number} size
* @return {Array}
* @api public
* @public
*/
req.range = function(size){
@@ -197,7 +210,7 @@ req.range = function(size){
* @param {String} name
* @param {Mixed} [defaultValue]
* @return {String}
* @api public
* @public
*/
req.param = function param(name, defaultValue) {
@@ -238,14 +251,23 @@ req.param = function param(name, defaultValue) {
* req.is('html');
* // => false
*
* @param {String} type
* @return {Boolean}
* @api public
* @param {String|Array} types...
* @return {String|false|null}
* @public
*/
req.is = function(types){
if (!Array.isArray(types)) types = [].slice.call(arguments);
return typeis(this, types);
req.is = function is(types) {
var arr = types;
// support flattened arguments
if (!Array.isArray(types)) {
arr = new Array(arguments.length);
for (var i = 0; i < arr.length; i++) {
arr[i] = arguments[i];
}
}
return typeis(this, arr);
};
/**
@@ -259,7 +281,7 @@ req.is = function(types){
* supplies https for you this may be enabled.
*
* @return {String}
* @api public
* @public
*/
defineGetter(req, 'protocol', function protocol(){
@@ -284,11 +306,11 @@ defineGetter(req, 'protocol', function protocol(){
* req.protocol == 'https'
*
* @return {Boolean}
* @api public
* @public
*/
defineGetter(req, 'secure', function secure(){
return 'https' == this.protocol;
return this.protocol === 'https';
});
/**
@@ -298,7 +320,7 @@ defineGetter(req, 'secure', function secure(){
* "trust proxy" is set.
*
* @return {String}
* @api public
* @public
*/
defineGetter(req, 'ip', function ip(){
@@ -315,7 +337,7 @@ defineGetter(req, 'ip', function ip(){
* "proxy2" were trusted.
*
* @return {Array}
* @api public
* @public
*/
defineGetter(req, 'ips', function ips() {
@@ -336,7 +358,7 @@ defineGetter(req, 'ips', function ips() {
* If "subdomain offset" is 3, req.subdomains is `["tobi"]`.
*
* @return {Array}
* @api public
* @public
*/
defineGetter(req, 'subdomains', function subdomains() {
@@ -356,7 +378,7 @@ defineGetter(req, 'subdomains', function subdomains() {
* Short-hand for `url.parse(req.url).pathname`.
*
* @return {String}
* @api public
* @public
*/
defineGetter(req, 'path', function path() {
@@ -371,7 +393,7 @@ defineGetter(req, 'path', function path() {
* be trusted.
*
* @return {String}
* @api public
* @public
*/
defineGetter(req, 'hostname', function hostname(){
@@ -390,7 +412,7 @@ defineGetter(req, 'hostname', function hostname(){
: 0;
var index = host.indexOf(':', offset);
return ~index
return index !== -1
? host.substring(0, index)
: host;
});
@@ -407,7 +429,7 @@ defineGetter(req, 'host', deprecate.function(function host(){
* still match.
*
* @return {Boolean}
* @api public
* @public
*/
defineGetter(req, 'fresh', function(){
@@ -431,7 +453,7 @@ defineGetter(req, 'fresh', function(){
* resource has changed.
*
* @return {Boolean}
* @api public
* @public
*/
defineGetter(req, 'stale', function stale(){
@@ -442,12 +464,12 @@ defineGetter(req, 'stale', function stale(){
* Check if the request was an _XMLHttpRequest_.
*
* @return {Boolean}
* @api public
* @public
*/
defineGetter(req, 'xhr', function xhr(){
var val = this.get('X-Requested-With') || '';
return 'xmlhttprequest' == val.toLowerCase();
return val.toLowerCase() === 'xmlhttprequest';
});
/**
@@ -456,7 +478,7 @@ defineGetter(req, 'xhr', function xhr(){
* @param {Object} obj
* @param {String} name
* @param {Function} getter
* @api private
* @private
*/
function defineGetter(obj, name, getter) {
Object.defineProperty(obj, name, {