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

✨ improvements + TypeScript Types #50

Merged
merged 4 commits into from
Jan 7, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
package-lock.json
49 changes: 49 additions & 0 deletions CHANGELOG.md
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
Copy link
Collaborator

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)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


### 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
20 changes: 0 additions & 20 deletions History.md

This file was deleted.

24 changes: 24 additions & 0 deletions README.md
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)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this belongs to PR which configures the actions (?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes this was supposed to be in GitHub Actions branch but since Readmd.md is changed to README.md in this one I thought of adding it here so there can be minimal diff, so first CI branch needs to get merged I guess

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, let's put this one on hold then for now

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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)
20 changes: 0 additions & 20 deletions Readme.md

This file was deleted.

17 changes: 17 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
type decodeFuncType = (
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Project exports three modules. Will querystring/encode and querystring/decode be also covered with this typings?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It wasn't earlier but I have made change to accomodate that

qs?: string,
sep?: string,
eq?: string,
options?: {
decodeURIComponent?: Function;
maxKeys?: number;
}
) => Record<any, unknown>;

type encodeFuncType = (obj?: Record<any, unknown>, sep?: string, eq?: string, name?: any) => string;

export const decode: decodeFuncType;
export const parse: decodeFuncType;

export const encode: encodeFuncType;
export const stringify: encodeFuncType;