-
Notifications
You must be signed in to change notification settings - Fork 72
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
✨ improvements + TypeScript Types #50
Changes from 2 commits
3092d4e
b10aa07
5293df8
8277b68
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules | ||
package-lock.json |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
|
||
## [Unreleased] | ||
|
||
## [0.2.1] - 2021-01-02 | ||
|
||
### Changed | ||
|
||
- Move to GitHub Actions | ||
- Improved `README.md` | ||
|
||
## [0.2.0] - 2013-02-21 | ||
|
||
### Changed | ||
|
||
- Refactor into function per-module idiomatic style. | ||
- Improved test coverage. | ||
|
||
## [0.1.0] - 2011-12-13 | ||
|
||
### Changed | ||
|
||
- Minor project reorganization | ||
|
||
## [0.0.3] - 2011-04-16 | ||
|
||
### Added | ||
|
||
- Support for AMD module loaders | ||
|
||
## [0.0.2] - 2011-04-16 | ||
|
||
### Changed | ||
|
||
- Ported unit tests | ||
|
||
### Removed | ||
|
||
- Removed functionality that depended on Buffers | ||
|
||
## [0.0.1] - 2011-04-15 | ||
|
||
### Added | ||
|
||
- Initial release |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# querystring | ||
|
||
[![GitHub Actions Status](https://github.com/Gozala/querystring/workflows/CI/badge.svg)](https://github.com/Gozala/querystring/actions) | ||
[![GitHub Legacy Actions Status](https://github.com/Gozala/querystring/workflows/LEGACY/badge.svg)](https://github.com/Gozala/querystring/actions) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this belongs to PR which configures the actions (?) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes this was supposed to be in GitHub Actions branch but since There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, let's put this one on hold then for now There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
[![NPM](https://img.shields.io/npm/v/querystring.svg)](https://npm.im/querystring) | ||
[![gzip](https://badgen.net/bundlephobia/minzip/querystring@latest)](https://bundlephobia.com/result?p=querystring@latest) | ||
|
||
Node's querystring module for all engines. | ||
|
||
_If you want to help with evolution of this package, please see https://github.com/Gozala/querystring/issues/20 PR's welcome!_ | ||
|
||
## 🔧 Install | ||
|
||
```sh | ||
npm i querystring | ||
``` | ||
|
||
## 📖 Documentation | ||
|
||
Refer to [Node's documentation for `querystring`](https://nodejs.org/api/querystring.html). | ||
|
||
## 📜 License | ||
|
||
MIT © [Gozala](https://github.com/Gozala) |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/** | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a way to keep typings in e.g. It'll be great to not mix them with regular modules (same as e.g. we keep tests in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tried doing that, by specifying "typings" flag in package.json but seems it's not working also we have seprate file based import as well There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
What exactly do you mean by that? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. means you can use same function multiple ways import qs from "querystring"
import encode from "querystring/encode" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Indeed, there's seems no way to keep then in dedicated dir. It's a pity, anyway let's go with this |
||
* parses a URL query string into a collection of key and value pairs | ||
* | ||
* @param qs The URL query string to parse | ||
* @param sep The substring used to delimit key and value pairs in the query string | ||
* @param eq The substring used to delimit keys and values in the query string | ||
* @param options.decodeURIComponent The function to use when decoding percent-encoded characters in the query string | ||
* @param options.maxKeys Specifies the maximum number of keys to parse. Specify 0 to remove key counting limitations default 1000 | ||
*/ | ||
export type decodeFuncType = ( | ||
qs?: string, | ||
sep?: string, | ||
eq?: string, | ||
options?: { | ||
decodeURIComponent?: Function; | ||
maxKeys?: number; | ||
} | ||
) => Record<any, unknown>; | ||
|
||
export default decodeFuncType; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/** | ||
* It serializes passed object into string | ||
* The numeric values must be finite. | ||
* Any other input values will be coerced to empty strings. | ||
* | ||
* @param obj The object to serialize into a URL query string | ||
* @param sep The substring used to delimit key and value pairs in the query string | ||
* @param eq The substring used to delimit keys and values in the query string | ||
* @param name | ||
*/ | ||
export type encodeFuncType = ( | ||
obj?: Record<any, unknown>, | ||
sep?: string, | ||
eq?: string, | ||
name?: any | ||
) => string; | ||
|
||
export default encodeFuncType; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import decodeFuncType from "./decode"; | ||
import encodeFuncType from "./encode"; | ||
|
||
export const decode: decodeFuncType; | ||
export const parse: decodeFuncType; | ||
|
||
export const encode: encodeFuncType; | ||
export const stringify: encodeFuncType; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove release notes for new version (I think it's nice to have releases not mixed with PR's that address different concerns)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done