Produced by Araxis Merge on 10/24/2017 6:38:24 AM Central Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | CHAMP_VA1.zip\CHAMP_VA1\app\node_modules\helmet\node_modules\connect\node_modules\parseurl | README.md | Mon Oct 16 21:06:50 2017 UTC |
| 2 | CHAMP_VA1.zip\CHAMP_VA1\app\node_modules\helmet\node_modules\connect\node_modules\parseurl | README.md | Thu Oct 19 20:04:46 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 238 |
| Changed | 1 | 2 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| Whitespace | |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
| 1 | # parseurl | |
| 2 | ||
| 3 | [![NPM Ver sion][npm- image]][np m-url] | |
| 4 | [![NPM Dow nloads][do wnloads-im age]][down loads-url] | |
| 5 | [![Node.js Version][ node-versi on-image]] [node-vers ion-url] | |
| 6 | [![Build S tatus][tra vis-image] ][travis-u rl] | |
| 7 | [![Test Co verage][co veralls-im age]][cove ralls-url] | |
| 8 | ||
| 9 | Parse a UR L with mem oization. | |
| 10 | ||
| 11 | ## Install | |
| 12 | ||
| 13 | ```bash | |
| 14 | $ npm inst all parseu rl | |
| 15 | ``` | |
| 16 | ||
| 17 | ## API | |
| 18 | ||
| 19 | ```js | |
| 20 | var parseu rl = requi re('parseu rl') | |
| 21 | ``` | |
| 22 | ||
| 23 | ### parseu rl(req) | |
| 24 | ||
| 25 | Parse the URL of the given req uest objec t (looks a t the `req .url` prop erty) | |
| 26 | and return the resul t. The res ult is the same as ` url.parse` in Node.j s core. | |
| 27 | Calling th is functio n multiple times on the same ` req` where `req.url` does | |
| 28 | not change will retu rn a cache d parsed o bject, rat her than p arsing aga in. | |
| 29 | ||
| 30 | ### parseu rl.origina l(req) | |
| 31 | ||
| 32 | Parse the original U RL of the given requ est object and retur n the resu lt. | |
| 33 | This works by trying to parse `req.origi nalUrl` if it is a s tring, oth erwise | |
| 34 | parses `re q.url`. Th e result i s the same as `url.p arse` in N ode.js cor e. | |
| 35 | Calling th is functio n multiple times on the same ` req` where `req.orig inalUrl` | |
| 36 | does not c hange will return a cached par sed object , rather t han parsin g again. | |
| 37 | ||
| 38 | ## Benchma rk | |
| 39 | ||
| 40 | ```bash | |
| 41 | $ npm run- script ben ch | |
| 42 | ||
| 43 | > parseurl @1.3.1 ben ch nodejs- parseurl | |
| 44 | > node ben chmark/ind ex.js | |
| 45 | ||
| 46 | > node ben chmark/ful lurl.js | |
| 47 | ||
| 48 | Parsing UR L "http:// localhost: PORT /foo/bar?u ser=tj&pet =fluffy" | |
| 49 | ||
| 50 | 1 test c ompleted. | |
| 51 | 2 tests completed. | |
| 52 | 3 tests completed. | |
| 53 | ||
| 54 | fasturl x 1,290, 780 ops/se c ±0.46% ( 195 runs s ampled) | |
| 55 | nativeur l x 56, 401 ops/se c ±0.22% ( 196 runs s ampled) | |
| 56 | parseurl x 55, 231 ops/se c ±0.22% ( 194 runs s ampled) | |
| 57 | ||
| 58 | > node ben chmark/pat hquery.js | |
| 59 | ||
| 60 | Parsing URL "/foo/ bar?user=t j&pet=fluf fy" | |
| 61 | ||
| 62 | 1 test c ompleted. | |
| 63 | 2 tests completed. | |
| 64 | 3 tests completed. | |
| 65 | ||
| 66 | fasturl x 1,986, 668 ops/se c ±0.27% ( 190 runs s ampled) | |
| 67 | nativeur l x 98, 740 ops/se c ±0.21% ( 195 runs s ampled) | |
| 68 | parseurl x 2,628, 171 ops/se c ±0.36% ( 195 runs s ampled) | |
| 69 | ||
| 70 | > node ben chmark/sam erequest.j s | |
| 71 | ||
| 72 | Parsing URL "/foo/ bar?user=t j&pet=fluf fy" on sam e request object | |
| 73 | ||
| 74 | 1 test c ompleted. | |
| 75 | 2 tests completed. | |
| 76 | 3 tests completed. | |
| 77 | ||
| 78 | fasturl x 2,184 ,468 ops/s ec ±0.40% (194 runs sampled) | |
| 79 | nativeur l x 99 ,437 ops/s ec ±0.71% (194 runs sampled) | |
| 80 | parseurl x 10,498 ,005 ops/s ec ±0.61% (186 runs sampled) | |
| 81 | ||
| 82 | > node ben chmark/sim plepath.js | |
| 83 | ||
| 84 | Parsing URL "/foo/ bar" | |
| 85 | ||
| 86 | 1 test c ompleted. | |
| 87 | 2 tests completed. | |
| 88 | 3 tests completed. | |
| 89 | ||
| 90 | fasturl x 4,535, 825 ops/se c ±0.27% ( 191 runs s ampled) | |
| 91 | nativeur l x 98, 769 ops/se c ±0.54% ( 191 runs s ampled) | |
| 92 | parseurl x 4,164, 865 ops/se c ±0.34% ( 192 runs s ampled) | |
| 93 | ||
| 94 | > node ben chmark/sla sh.js | |
| 95 | ||
| 96 | Parsing URL "/" | |
| 97 | ||
| 98 | 1 test c ompleted. | |
| 99 | 2 tests completed. | |
| 100 | 3 tests completed. | |
| 101 | ||
| 102 | fasturl x 4,908, 405 ops/se c ±0.42% ( 191 runs s ampled) | |
| 103 | nativeur l x 100, 945 ops/se c ±0.59% ( 188 runs s ampled) | |
| 104 | parseurl x 4,333, 208 ops/se c ±0.27% ( 194 runs s ampled) | |
| 105 | ``` | |
| 106 | ||
| 107 | ## License | |
| 108 | ||
| 109 | [MIT](LI CENSE) | |
| 110 | ||
| 111 | [npm-image ]: https:/ /img.shiel ds.io/npm/ v/parseurl .svg | |
| 112 | [npm-url]: https://n pmjs.org/p ackage/par seurl | |
| 113 | [node-vers ion-image] : https:// img.shield s.io/node/ v/parseurl .svg | |
| 114 | [node-vers ion-url]: http://nod ejs.org/do wnload/ | |
| 115 | [travis-im age]: http s://img.sh ields.io/t ravis/pill arjs/parse url/master .svg | |
| 116 | [travis-ur l]: https: //travis-c i.org/pill arjs/parse url | |
| 117 | [coveralls -image]: h ttps://img .shields.i o/coverall s/pillarjs /parseurl/ master.svg | |
| 118 | [coveralls -url]: htt ps://cover alls.io/r/ pillarjs/p arseurl?br anch=maste r | |
| 119 | [downloads -image]: h ttps://img .shields.i o/npm/dm/p arseurl.sv g | |
| 120 | [downloads -url]: htt ps://npmjs .org/packa ge/parseur l |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.