Coder Social home page Coder Social logo

Global "duplicates" parameter about uri.js HOT 5 CLOSED

paftek avatar paftek commented on May 18, 2024
Global "duplicates" parameter

from uri.js.

Comments (5)

rodneyrehm avatar rodneyrehm commented on May 18, 2024

how exactly are you using URI.js? (what are you doing and what are you expecting exactly)

from uri.js.

paftek avatar paftek commented on May 18, 2024

My points:

Goal

I want to replace all my utility methods about URI modifications by a lib doing it the proper way. I mostly modify query strings and compare URI.

Question about duplicates

Event if I cannot find a case yet where I need to send duplicates, my utility methods do not prevent me to do that. I do not want a regression on that specific point by switching to the URI lib.
Is the duplicates removal a part of any specification?

Consistency

If URI.buildQuery() offers me a way to choose if whether or not I want duplicates, why uri.addQuery() cannot?

from uri.js.

rodneyrehm avatar rodneyrehm commented on May 18, 2024

Is the duplicates removal a part of any specification?

hell no. All that is defined is the syntax - but nobody every said anything about semantics. This lead to a lot of different implementations regarding the handling of query strings. ?foo=1&foo=2 is treated as foo = 2 in one environment and as foo = [1, 2] in another.

v1.8.0 is on the doorstep (waiting a couple of days for some possible fix in QUnit). I've already introduced URI.duplicateQueryParameters = true; for global configuration and URI("…").duplicateQueryParameter(true) for instance configuration. Consider your problem solved, just not released yet.

(I'll close the ticket once v1.8.0 is out)

from uri.js.

paftek avatar paftek commented on May 18, 2024

Great, many thanks!

from uri.js.

rodneyrehm avatar rodneyrehm commented on May 18, 2024

Issue resolved with v1.8.0

from uri.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.