-
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
3092d4e
:sparkles: docs improvements + added types
harshzalavadiya b10aa07
:recycle: updated types to support file import
harshzalavadiya 5293df8
🔥 removed GitHub Actions Badges
harshzalavadiya 8277b68
:recycle: removed release notes for new version
harshzalavadiya File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules | ||
package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# 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.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.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# querystring | ||
|
||
[![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.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/** | ||
* 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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Is there a way to keep typings in e.g.
typings
folder?It'll be great to not mix them with regular modules (same as e.g. we keep tests in
test
folder) ?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.
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 comment
The 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 comment
The reason will be displayed to describe this comment to others. Learn more.
means you can use same function multiple ways
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.
Indeed, there's seems no way to keep then in dedicated dir. It's a pity, anyway let's go with this