medialize / medialize/URI.js

Parameter check does not work as expected

Open
#314 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
6.2k
Forks
468
PR merge metrics
No merged PRs in 30d

Description

Hi, pal ...

Im doing something wrong here ? why truthy / falsy value check does not work as expected here my test:

URI('http://test.com?boolean=true').hasQuery('boolean', true);
// true (right)

URI('http://test.com?boolean=false').hasQuery('boolean', true);
// true (it might be false or not?)

thks !!!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the URI('http://test.com?boolean=false').hasQuery('boolean', true) example and trace the hasQuery implementation and its existing tests. Determine whether the observed result is intended query-value behavior or a bug, then add or update coverage so the true and false examples have an unambiguous expected result.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.