1
0
mirror of https://github.com/mgerb/mywebsite synced 2026-01-12 02:42:48 +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 4bb8cae81e
commit 6ab45fe935
13249 changed files with 317868 additions and 2101398 deletions

23
node_modules/vary/HISTORY.md generated vendored Normal file
View File

@@ -0,0 +1,23 @@
1.0.1 / 2015-07-08
==================
* Fix setting empty header from empty `field`
* perf: enable strict mode
* perf: remove argument reassignments
1.0.0 / 2014-08-10
==================
* Accept valid `Vary` header string as `field`
* Add `vary.append` for low-level string manipulation
* Move to `jshttp` orgainzation
0.1.0 / 2014-06-05
==================
* Support array of fields to set
0.0.0 / 2014-06-04
==================
* Initial release

22
node_modules/vary/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,22 @@
(The MIT License)
Copyright (c) 2014-2015 Douglas Christopher Wilson
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

91
node_modules/vary/README.md generated vendored Normal file
View File

@@ -0,0 +1,91 @@
# vary
[![NPM Version][npm-image]][npm-url]
[![NPM Downloads][downloads-image]][downloads-url]
[![Node.js Version][node-version-image]][node-version-url]
[![Build Status][travis-image]][travis-url]
[![Test Coverage][coveralls-image]][coveralls-url]
Manipulate the HTTP Vary header
## Installation
```sh
$ npm install vary
```
## API
```js
var vary = require('vary')
```
### vary(res, field)
Adds the given header `field` to the `Vary` response header of `res`.
This can be a string of a single field, a string of a valid `Vary`
header, or an array of multiple fields.
This will append the header if not already listed, otherwise leaves
it listed in the current location.
```js
// Append "Origin" to the Vary header of the response
vary(res, 'Origin')
```
### vary.append(header, field)
Adds the given header `field` to the `Vary` response header string `header`.
This can be a string of a single field, a string of a valid `Vary` header,
or an array of multiple fields.
This will append the header if not already listed, otherwise leaves
it listed in the current location. The new header string is returned.
```js
// Get header string appending "Origin" to "Accept, User-Agent"
vary.append('Accept, User-Agent', 'Origin')
```
## Examples
### Updating the Vary header when content is based on it
```js
var http = require('http')
var vary = require('vary')
http.createServer(function onRequest(req, res) {
// about to user-agent sniff
vary(res, 'User-Agent')
var ua = req.headers['user-agent'] || ''
var isMobile = /mobi|android|touch|mini/i.test(ua)
// serve site, depending on isMobile
res.setHeader('Content-Type', 'text/html')
res.end('You are (probably) ' + (isMobile ? '' : 'not ') + 'a mobile user')
})
```
## Testing
```sh
$ npm test
```
## License
[MIT](LICENSE)
[npm-image]: https://img.shields.io/npm/v/vary.svg
[npm-url]: https://npmjs.org/package/vary
[node-version-image]: https://img.shields.io/node/v/vary.svg
[node-version-url]: http://nodejs.org/download/
[travis-image]: https://img.shields.io/travis/jshttp/vary/master.svg
[travis-url]: https://travis-ci.org/jshttp/vary
[coveralls-image]: https://img.shields.io/coveralls/jshttp/vary/master.svg
[coveralls-url]: https://coveralls.io/r/jshttp/vary
[downloads-image]: https://img.shields.io/npm/dm/vary.svg
[downloads-url]: https://npmjs.org/package/vary

117
node_modules/vary/index.js generated vendored Normal file
View File

@@ -0,0 +1,117 @@
/*!
* vary
* Copyright(c) 2014-2015 Douglas Christopher Wilson
* MIT Licensed
*/
'use strict';
/**
* Module exports.
*/
module.exports = vary;
module.exports.append = append;
/**
* Variables.
*/
var separators = /[\(\)<>@,;:\\"\/\[\]\?=\{\}\u0020\u0009]/;
/**
* Append a field to a vary header.
*
* @param {String} header
* @param {String|Array} field
* @return {String}
* @api public
*/
function append(header, field) {
if (typeof header !== 'string') {
throw new TypeError('header argument is required');
}
if (!field) {
throw new TypeError('field argument is required');
}
// get fields array
var fields = !Array.isArray(field)
? parse(String(field))
: field;
// assert on invalid fields
for (var i = 0; i < fields.length; i++) {
if (separators.test(fields[i])) {
throw new TypeError('field argument contains an invalid header');
}
}
// existing, unspecified vary
if (header === '*') {
return header;
}
// enumerate current values
var val = header;
var vals = parse(header.toLowerCase());
// unspecified vary
if (fields.indexOf('*') !== -1 || vals.indexOf('*') !== -1) {
return '*';
}
for (var i = 0; i < fields.length; i++) {
var fld = fields[i].toLowerCase();
// append value (case-preserving)
if (vals.indexOf(fld) === -1) {
vals.push(fld);
val = val
? val + ', ' + fields[i]
: fields[i];
}
}
return val;
}
/**
* Parse a vary header into an array.
*
* @param {String} header
* @return {Array}
* @api private
*/
function parse(header) {
return header.trim().split(/ *, */);
}
/**
* Mark that a request is varied on a header field.
*
* @param {Object} res
* @param {String|Array} field
* @api public
*/
function vary(res, field) {
if (!res || !res.getHeader || !res.setHeader) {
// quack quack
throw new TypeError('res argument is required');
}
// get existing header
var val = res.getHeader('Vary') || ''
var header = Array.isArray(val)
? val.join(', ')
: String(val);
// set new header
if ((val = append(header, field))) {
res.setHeader('Vary', val);
}
}

99
node_modules/vary/package.json generated vendored Normal file
View File

@@ -0,0 +1,99 @@
{
"_args": [
[
"vary@~1.0.1",
"/home/mitchell/Desktop/test-mywebsite/mywebsite/node_modules/express"
]
],
"_from": "vary@>=1.0.1 <1.1.0",
"_id": "vary@1.0.1",
"_inCache": true,
"_installable": true,
"_location": "/vary",
"_npmUser": {
"email": "doug@somethingdoug.com",
"name": "dougwilson"
},
"_npmVersion": "1.4.28",
"_phantomChildren": {},
"_requested": {
"name": "vary",
"raw": "vary@~1.0.1",
"rawSpec": "~1.0.1",
"scope": null,
"spec": ">=1.0.1 <1.1.0",
"type": "range"
},
"_requiredBy": [
"/express",
"/method-override"
],
"_resolved": "https://registry.npmjs.org/vary/-/vary-1.0.1.tgz",
"_shasum": "99e4981566a286118dfb2b817357df7993376d10",
"_shrinkwrap": null,
"_spec": "vary@~1.0.1",
"_where": "/home/mitchell/Desktop/test-mywebsite/mywebsite/node_modules/express",
"author": {
"email": "doug@somethingdoug.com",
"name": "Douglas Christopher Wilson"
},
"bugs": {
"url": "https://github.com/jshttp/vary/issues"
},
"dependencies": {},
"description": "Manipulate the HTTP Vary header",
"devDependencies": {
"istanbul": "0.3.17",
"mocha": "2.2.5",
"supertest": "1.0.1"
},
"directories": {},
"dist": {
"shasum": "99e4981566a286118dfb2b817357df7993376d10",
"tarball": "http://registry.npmjs.org/vary/-/vary-1.0.1.tgz"
},
"engines": {
"node": ">= 0.8"
},
"files": [
"HISTORY.md",
"LICENSE",
"README.md",
"index.js"
],
"gitHead": "650282ff8e614731837040a23e10f51c20728392",
"homepage": "https://github.com/jshttp/vary",
"keywords": [
"http",
"res",
"vary"
],
"license": "MIT",
"maintainers": [
{
"name": "dougwilson",
"email": "doug@somethingdoug.com"
},
{
"name": "jongleberry",
"email": "jonathanrichardong@gmail.com"
},
{
"name": "fishrock123",
"email": "fishrock123@rocketmail.com"
}
],
"name": "vary",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git+https://github.com/jshttp/vary.git"
},
"scripts": {
"test": "mocha --reporter spec --bail --check-leaks test/",
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
"test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
},
"version": "1.0.1"
}