Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stringify Object Accordingly #319

Closed
alanyong91 opened this issue Jun 17, 2021 · 1 comment
Closed

Stringify Object Accordingly #319

alanyong91 opened this issue Jun 17, 2021 · 1 comment

Comments

@alanyong91
Copy link

Just curios, is it possible to render the string accordingly?

Example:

import qs from 'query-string';

const queryObject = {
  sort: 'name',
  order: 'ASC',
  page: 100,
  limit: 1
}

const qsStringify = qs.stringify(queryObject)
console.log(qsStringify)

The Outcome:
limit=1&order=ASC&page=100&sort=name

Expected result:
sort=name&order=ASC&page=100&limit=1

@sindresorhus
Copy link
Owner

Please read the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants