Initial commit
This commit is contained in:
30
node_modules/fast-url-parser/.npmignore
generated
vendored
Normal file
30
node_modules/fast-url-parser/.npmignore
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
node_modules/*
|
||||
todo.txt
|
||||
npm-debug.log
|
||||
test/*
|
||||
benchmark/*
|
||||
browser/*
|
||||
async
|
||||
sync
|
||||
mixed
|
||||
bench.json
|
||||
js/browser
|
||||
js/browser/*
|
||||
js/debug
|
||||
js/debug/*
|
||||
reader.js
|
||||
read.txt
|
||||
bench
|
||||
.editorconfig
|
||||
.jshintrc
|
||||
ast_passes.js
|
||||
mocharun.js
|
||||
throwaway.js
|
||||
throwaway.html
|
||||
urlparser.sublime-workspace
|
||||
urlparser.sublime-project
|
||||
changelog.js
|
||||
.travis.yml
|
||||
sauce_connect.log
|
||||
nodex64.exe
|
||||
bump.js
|
||||
19
node_modules/fast-url-parser/LICENSE
generated
vendored
Normal file
19
node_modules/fast-url-parser/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
Copyright (c) 2014 Petka Antonov
|
||||
|
||||
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.
|
||||
84
node_modules/fast-url-parser/README.md
generated
vendored
Normal file
84
node_modules/fast-url-parser/README.md
generated
vendored
Normal file
@@ -0,0 +1,84 @@
|
||||
#Introduction
|
||||
|
||||
Fast implementation of an url parser for node.js.
|
||||
|
||||
#Quick start
|
||||
|
||||
npm install fast-url-parser
|
||||
|
||||
```js
|
||||
var url = require("fast-url-parser");
|
||||
```
|
||||
|
||||
#API
|
||||
|
||||
This module has exactly the same API and semantics as the `require("url");`- module that comes with node.
|
||||
|
||||
See [Node.JS URL API documentation](http://nodejs.org/docs/latest/api/url.html).
|
||||
|
||||
In addition, you may inject a custom query string implementation by setting the `url.queryString` property. The module export object must expose the methods `.parse` and `.stringify`. By default the core `"querystring"` module is used.
|
||||
|
||||
You may disable automatic escaping of some characters when parsing an URL by passing `true` as a forth argument so that: `url.format(url.parse(yourUrl, false, false, true)) == yourUrl`
|
||||
|
||||
Example:
|
||||
|
||||
```js
|
||||
var url = require("fast-url-parser");
|
||||
// the querystringparser module supports nested properties
|
||||
url.queryString = require("querystringparser");
|
||||
var parsed = Url.parse('/path?user[name][first]=tj&user[name][last]=holowaychuk', true);
|
||||
console.log(parsed.query);
|
||||
//{ user: { name: { first: 'tj', last: 'holowaychuk' } } }
|
||||
```
|
||||
|
||||
If in your application you may want all modules use this parser automatically, you can do so by inserting this line at the beginning of your application:
|
||||
|
||||
```js
|
||||
require("fast-url-parser").replace();
|
||||
```
|
||||
|
||||
Anything that now calls `require("url")` will instead get an instance of this module instead of the url parser that comes with node core.
|
||||
|
||||
#Performance
|
||||
|
||||
Petka Antonov@PETKAANTONOV-PC ~/urlparser (master)
|
||||
$ node ./benchmark/urlparser.js
|
||||
misc/url.js parse(): 402045.67
|
||||
misc/url.js format(): 253946.82
|
||||
misc/url.js resolve("../foo/bar?baz=boom"): 56701.419
|
||||
misc/url.js resolve("foo/bar"): 80059.500
|
||||
misc/url.js resolve("http://nodejs.org"): 118566.13
|
||||
misc/url.js resolve("./foo/bar?baz"): 62778.648
|
||||
|
||||
Petka Antonov@PETKAANTONOV-PC ~/urlparser (master)
|
||||
$ node ./benchmark/nodecore.js
|
||||
misc/url.js parse(): 16459
|
||||
misc/url.js format(): 15978
|
||||
misc/url.js resolve("../foo/bar?baz=boom"): 6837.7
|
||||
misc/url.js resolve("foo/bar"): 7038.6
|
||||
misc/url.js resolve("http://nodejs.org"): 6491.1
|
||||
misc/url.js resolve("./foo/bar?baz"): 6968.4
|
||||
|
||||
#License
|
||||
|
||||
MIT License:
|
||||
|
||||
Copyright (c) 2014 Petka Antonov
|
||||
|
||||
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.
|
||||
46
node_modules/fast-url-parser/package.json
generated
vendored
Normal file
46
node_modules/fast-url-parser/package.json
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"name": "fast-url-parser",
|
||||
"description": "Extremely fast implementation of node core url library",
|
||||
"version": "1.1.3",
|
||||
"keywords": [
|
||||
"fast",
|
||||
"parse",
|
||||
"parser",
|
||||
"url",
|
||||
"uri",
|
||||
"performance"
|
||||
],
|
||||
"scripts": {
|
||||
"test": "npm run jshint && node ./test/index.js | tap-spec",
|
||||
"dot": "node ./test/index.js | tap-dot",
|
||||
"bench": "node ./benchmark/urlparser.js",
|
||||
"bench-node": "node ./benchmark/nodecore.js",
|
||||
"jshint": "jshint --verbose ./src/*"
|
||||
},
|
||||
"homepage": "https://github.com/petkaantonov/urlparser",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/petkaantonov/urlparser.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "http://github.com/petkaantonov/urlparser/issues"
|
||||
},
|
||||
"license": "MIT",
|
||||
"author": {
|
||||
"name": "Petka Antonov",
|
||||
"email": "petka_antonov@hotmail.com",
|
||||
"url": "http://github.com/petkaantonov/"
|
||||
},
|
||||
"dependencies": {
|
||||
"punycode": "^1.3.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"jshint": "^2.5.10",
|
||||
"querystringparser": "^0.1.1",
|
||||
"tap-dot": "^0.2.3",
|
||||
"tap-spec": "^2.1.1",
|
||||
"tape": "^3.0.3"
|
||||
},
|
||||
"readmeFilename": "README.md",
|
||||
"main": "./src/urlparser.js"
|
||||
}
|
||||
1061
node_modules/fast-url-parser/src/urlparser.js
generated
vendored
Normal file
1061
node_modules/fast-url-parser/src/urlparser.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user