Node.js initialisiert
This commit is contained in:
index.jspackage-lock.jsonpackage.json
node_modules
.bin
accepts
after
array-flatten
arraybuffer.slice
async-limiter
.travis.ymlLICENSE
coverage
coverage.json
index.jspackage.jsonreadme.mdlcov-report
lcov.infobacko2
base64-arraybuffer
base64id
better-assert
blob
callsite
component-bind
component-emitter
component-inherit
content-disposition
content-type
cookie-signature
cookie
debug
.coveralls.yml.eslintrc.npmignore.travis.ymlCHANGELOG.mdLICENSEMakefileREADME.mdbower.jsoncomponent.jsonkarma.conf.jsnode.jspackage.json
src
depd
destroy
ee-first
encodeurl
engine.io-client
LICENSEREADME.mdengine.io.jspackage.json
lib
node_modules
debug
.coveralls.yml.eslintrc.npmignore.travis.ymlCHANGELOG.mdLICENSEMakefileREADME.mdkarma.conf.jsnode.jspackage.json
src
ms
engine.io-parser
engine.io
LICENSEREADME.mdpackage.json
lib
node_modules
debug
.coveralls.yml.eslintrc.npmignore.travis.ymlCHANGELOG.mdLICENSEMakefileREADME.mdkarma.conf.jsnode.jspackage.json
src
ms
escape-html
etag
express
History.mdLICENSEReadme.mdindex.js
lib
package.jsonfinalhandler
HISTORY.mdLICENSEREADME.mdindex.jspackage.json
node_modules
debug
.coveralls.yml.eslintrc.npmignore.travis.ymlCHANGELOG.mdLICENSEMakefileREADME.mdcomponent.jsonkarma.conf.jsnode.jspackage.json
src
ms
forwarded
fresh
has-binary2
has-cors
http-errors
indexof
inherits
ipaddr.js
isarray
media-typer
merge-descriptors
methods
mime-db
mime-types
mime
ms
negotiator
object-component
on-finished
parseqs
parseuri
parseurl
path-to-regexp
proxy-addr
qs
range-parser
safe-buffer
send
serve-static
setprototypeof
socket.io-adapter
socket.io-client
LICENSEREADME.mdpackage.json
dist
socket.io.dev.jssocket.io.dev.js.mapsocket.io.jssocket.io.js.mapsocket.io.slim.dev.jssocket.io.slim.dev.js.mapsocket.io.slim.jssocket.io.slim.js.map
lib
node_modules
debug
.coveralls.yml.eslintrc.npmignore.travis.ymlCHANGELOG.mdLICENSEMakefileREADME.mdkarma.conf.jsnode.jspackage.json
src
ms
socket.io-parser
LICENSEReadme.mdbinary.jsindex.jsis-buffer.jspackage.json
node_modules
debug
.coveralls.yml.eslintrc.npmignore.travis.ymlCHANGELOG.mdLICENSEMakefileREADME.mdkarma.conf.jsnode.jspackage.json
src
ms
socket.io
LICENSEReadme.mdpackage.json
lib
node_modules
debug
.coveralls.yml.eslintrc.npmignore.travis.ymlCHANGELOG.mdLICENSEMakefileREADME.mdkarma.conf.jsnode.jspackage.json
src
ms
statuses
to-array
type-is
ultron
unpipe
utils-merge
vary
ws
LICENSEREADME.mdindex.js
lib
.DS_StoreBufferUtil.jsConstants.jsErrorCodes.jsEventTarget.jsExtensions.jsPerMessageDeflate.jsReceiver.jsSender.jsValidation.jsWebSocket.jsWebSocketServer.js
package.jsonxmlhttprequest-ssl
yeast
public
11
node_modules/mime/build/build.js
generated
vendored
Normal file
11
node_modules/mime/build/build.js
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
var db = require('mime-db');
|
||||
|
||||
var mapByType = {};
|
||||
Object.keys(db).forEach(function(key) {
|
||||
var extensions = db[key].extensions;
|
||||
if (extensions) {
|
||||
mapByType[key] = extensions;
|
||||
}
|
||||
});
|
||||
|
||||
console.log(JSON.stringify(mapByType));
|
57
node_modules/mime/build/test.js
generated
vendored
Normal file
57
node_modules/mime/build/test.js
generated
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
/**
|
||||
* Usage: node test.js
|
||||
*/
|
||||
|
||||
var mime = require('../mime');
|
||||
var assert = require('assert');
|
||||
var path = require('path');
|
||||
|
||||
//
|
||||
// Test mime lookups
|
||||
//
|
||||
|
||||
assert.equal('text/plain', mime.lookup('text.txt')); // normal file
|
||||
assert.equal('text/plain', mime.lookup('TEXT.TXT')); // uppercase
|
||||
assert.equal('text/plain', mime.lookup('dir/text.txt')); // dir + file
|
||||
assert.equal('text/plain', mime.lookup('.text.txt')); // hidden file
|
||||
assert.equal('text/plain', mime.lookup('.txt')); // nameless
|
||||
assert.equal('text/plain', mime.lookup('txt')); // extension-only
|
||||
assert.equal('text/plain', mime.lookup('/txt')); // extension-less ()
|
||||
assert.equal('text/plain', mime.lookup('\\txt')); // Windows, extension-less
|
||||
assert.equal('application/octet-stream', mime.lookup('text.nope')); // unrecognized
|
||||
assert.equal('fallback', mime.lookup('text.fallback', 'fallback')); // alternate default
|
||||
|
||||
//
|
||||
// Test extensions
|
||||
//
|
||||
|
||||
assert.equal('txt', mime.extension(mime.types.text));
|
||||
assert.equal('html', mime.extension(mime.types.htm));
|
||||
assert.equal('bin', mime.extension('application/octet-stream'));
|
||||
assert.equal('bin', mime.extension('application/octet-stream '));
|
||||
assert.equal('html', mime.extension(' text/html; charset=UTF-8'));
|
||||
assert.equal('html', mime.extension('text/html; charset=UTF-8 '));
|
||||
assert.equal('html', mime.extension('text/html; charset=UTF-8'));
|
||||
assert.equal('html', mime.extension('text/html ; charset=UTF-8'));
|
||||
assert.equal('html', mime.extension('text/html;charset=UTF-8'));
|
||||
assert.equal('html', mime.extension('text/Html;charset=UTF-8'));
|
||||
assert.equal(undefined, mime.extension('unrecognized'));
|
||||
|
||||
//
|
||||
// Test node.types lookups
|
||||
//
|
||||
|
||||
assert.equal('application/font-woff', mime.lookup('file.woff'));
|
||||
assert.equal('application/octet-stream', mime.lookup('file.buffer'));
|
||||
assert.equal('audio/mp4', mime.lookup('file.m4a'));
|
||||
assert.equal('font/opentype', mime.lookup('file.otf'));
|
||||
|
||||
//
|
||||
// Test charsets
|
||||
//
|
||||
|
||||
assert.equal('UTF-8', mime.charsets.lookup('text/plain'));
|
||||
assert.equal(undefined, mime.charsets.lookup(mime.types.js));
|
||||
assert.equal('fallback', mime.charsets.lookup('application/octet-stream', 'fallback'));
|
||||
|
||||
console.log('\nAll tests passed');
|
Reference in New Issue
Block a user