Skip to content

6.x querystring.parse returns object for which instanceof Object is false (was true for 4.x) #8737

@kosmjon

Description

@kosmjon
  • Version: 6.3.1 and also 6.6.0
  • Platform: Windows 7 x64 and also Centos 64 x86
    Linux ip-10-0-0-35.localdomain 3.10.0-229.14.1.el7.x86_64 deps: update openssl to 1.0.1j #1 SMP Tue Sep 15 15:05:51 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
  • Subsystem: querystring

Here is a snippet that demos the problem:

var params, qs = require('querystring');
params = qs.parse('languageId=en-US');
console.log('%j %s', params, typeof params);
if (params instanceof Object) {
  console.log('params instanceof Object is true');
} else {
  console.log('params instanceof Object is false');
}

On 4.4.4 prints:
{"languageId":"en-US"} object
params instanceof Object is true
On 6.3.1 and 6.6.0 prints:
{"languageId":"en-US"} object
params instanceof Object is false

Metadata

Metadata

Assignees

No one assigned

    Labels

    querystringIssues and PRs related to the built-in querystring module.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions