aboutsummaryrefslogtreecommitdiff
path: root/lib/querystring.js
AgeCommit message (Collapse)Author
2014-11-22lib: turn on strict modeBen Noordhuis
Turn on strict mode for the files in the lib/ directory. It helps catch bugs and can have a positive effect on performance. PR-URL: https://github.com/node-forward/node/pull/64 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Fedor Indutny <fedor@indutny.com>
2014-09-16Merge remote-tracking branch 'upstream/v0.10' into v0.12Timothy J Fontaine
Conflicts: ChangeLog deps/v8/src/hydrogen.cc lib/http.js lib/querystring.js src/node_crypto.cc src/node_version.h test/simple/test-querystring.js
2014-08-27querystring: fix unescape overrideTristan Berger
Documentation states that `querystring.unescape` may be overridden to replace unescaper during parsing. However, the function was only being used as a fallback for when the native decoder throws (on a malformed URL). This patch moves the call to the native function and the try/catch around it into querystring.unescape then has the parser always invoke it, so that an override will always be used. Fixes #4055 Reviewed-By: Fedor Indutny <fedor@indutny.com>
2014-07-24querystring: do not add sep for empty arraycjihrig
Currently, stringification of an empty array outputs a single separator character. This commit causes an empty array to output the empty string. Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-05-22querystring: custom encode and decodefengmk2
Not all querystring are utf-8 encoding, make querystring can be used to encode / decode `non-utf8` encoding string if necessary. Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
2013-12-30querystring: remove `name` from `stringify()`Yorkie
QueryString.stringify() allowed a fourth argument that was used as a conditional in the return value, but was undocumented, not used by core and always was always false/undefiend. So the argument and conditional have been removed. Signed-off-by: Trevor Norris <trev.norris@gmail.com>
2013-12-20Revert "util: more strict check for bool/number/string"Trevor Norris
This reverts commit 95ee84fabe0b028ef964cc1032cd56a6cf89cb0e.
2013-12-18util: more strict check for bool/number/stringYorkie
2013-08-01src: Replace macros with util functionsisaacs
2013-07-24lib: macro-ify type checksBen Noordhuis
Increases the grep factor. Makes it easier to harmonize type checks across the code base.
2013-04-01querystring: Removing unnecessary bindingMitar
Binding of `http_parser` in querystring isn't used anywhere and should be removed.
2012-06-19trivial: Doc typo and lint fixisaacs
2012-06-16querystring: improved speed and code cleanupFelix Böhm
2012-05-11Fix #3058 querystring: Fix incorrect handling of empty keysisaacs
2012-02-22lint, missed in QS speed mergeisaacs
2012-02-21Make QueryString.parse() even fasterBrian White
2012-02-18Lint all the JavaScripts.isaacs
2012-02-06Merge remote-tracking branch 'ry/v0.6'isaacs
Conflicts: ChangeLog deps/v8/src/version.cc deps/v8/tools/gyp/v8.gyp doc/about/index.html doc/community/index.html doc/index.html doc/logos/index.html doc/template.html lib/path.js lib/querystring.js src/node_version.h
2012-02-01Make QueryString.parse run fasterPhilip Tellis
Use decodeURIComponent when appropriate, and only fall back to querystring.decode if it throws, or if the character is a '+'. Fix #2248
2012-01-16querystring: fix maxKeys = 0 is ignoredFedor Indutny
2012-01-16http, querystring: added limits to prevent DoSFedor Indutny
2011-09-15Fix #1707 hasOwnProperty usageisaacs
If hasOwnProperty is overridden, then calling `obj.hasOwnProperty(prop)` can fail. Any time a dictionary of user-generated items is built, we cannot rely on hasOwnProperty being safe, so must call it from the Object.prototype explicitly.
2011-09-15Fix #1707 hasOwnProperty usageisaacs
2011-08-11Fix #1497 querystring: Replace 'in' test with 'hasOwnProperty'isaacs
2011-03-14Update copyright headersRyan Dahl
2010-12-20url.parse(url, true) defaults query field to {}Jeremy Martin
2010-12-01more lintRyan Dahl
2010-11-18Add querystring.unescapeBufferRyan Dahl
2010-11-18query-string unescape moved to js landRyan Dahl
2010-09-13Get rid of PHP/Rails style parameter munging.Peter Griess
- Handle only the most basic of query string parsing and construction. Leave the rest (e.g. Rails/PHP behaviors) to modules higher up the stack, like Express.
2010-08-05querystring.parse: handle undefined value properlycloudhead
2010-07-19querystring: Removing typecasting of numeric strings to numbersMicheil Smith
The tests did not accurately test for a strict equality, meaning that the number == to the string.
2010-07-19querystring.stringify is now more solidJan Kassens
* handles NaN and Infinity * works with arrays from other contexts
2010-06-29Rewrote QueryString.parse to make it smaller and more effective.Dmitry Baranovskiy
Also added ability to parse foo.bar=4 equal to foo[bar]=4 Added tests for this as well
2010-06-29Refactored isA, isBool, etc functions to use some of ES5 goodness.Dmitry Baranovskiy
2010-06-15A replacement for decodeURIComponent that doesn't throw.isaacs
And add a few more tests.
2010-04-28Allow callers to disable PHP/Rails style parameter mungeing in ↵Thomas Lee
querystring.stringify
2010-04-12Replace slow and broken for..in loops with faster for loops over the keys.Tim Caswell
2010-04-11trailing whitespace fixesisaacs
2010-03-05Bugfix in querystringRyan Dahl
2010-01-04Add URL and QueryString modules, and tests for each.isaacs
Also, make a slight change from original on url-module to put the spacePattern into the function. On closer inspection, it turns out that the nonlocal-var cost is higher than the compiling-a-regexp cost. Also, documentation.