Giter Club home page Giter Club logo

query-object's Introduction

Hey there! ๐Ÿ‘‹

You might have reached my profile looking for some interesting stuff I'm currently working on. While I love programming in general, I mostly dedicate my free hours to other hobbies (that actually help me recharge ๐Ÿ˜„).

From time to time these hobbies will overlap with programming topics & studies, and therefore I might add something here, but in general expect mostly work related stuff!

If you are still interested in getting touch with me, please feel free to reach out at [email protected]

query-object's People

Contributors

fernandofleury avatar jbrooksuk avatar lagden avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

query-object's Issues

Doesn't support arrays

Give this object:

{"nights":"7","dep_iata":"GLA","rooms":"1","room":[{"adults":"1","children":"0"}],"month":5,"year":2015}

The query string becomes:

?nights=7&dep_iata=GLA&rooms=1&room=%5Bobject%20Object%5D&month=5&year=2015

There needs to be support for arrays.

has function throws error when there is no query object

If you use queryObject.has('foo') when there is no query object, an error is thrown. I would expect it to return false in this case.

Example

Without query object

// example.com

queryObject.has('bar');
// query-object.js:177 Uncaught TypeError: Cannot read property 'hasOwnProperty' of undefined

With query object

// example.com?foo

queryObject.has('bar');
// returns false

Treat plus signs ('+') as spaces

Plus signs ('+') in query strings are expected to be treated as spaces. In order to transmit an actual character '+', it have to be encoded.

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.