Skip to content
This repository was archived by the owner on May 1, 2025. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ module.exports = function MongoQS(options) {
// String Value Parsing
opts.string = opts.string || {};
this.string = opts.string || {};
this.string.toBoolean = opts.string.toBoolean || true;
this.string.toNumber = opts.string.toNumber || true;
this.string.toBoolean = (typeof(opts.string.toBoolean) === "boolean") ? opts.string.toBoolean : true;
this.string.toNumber = (typeof(opts.string.toNumber) === "boolean") ? opts.string.toNumber : true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you remove the ( and ) after typeof to make the tests passing?


this.keyRegex = opts.keyRegex || /^[a-zæøå0-9-_.]+$/i;
this.valRegex = opts.valRegex || /[^a-zæøå0-9-_.* ]/i;
Expand Down