-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: rework to use fast-querystring
Uses a fork of fast-querystring instead of having to do two passes.
- Loading branch information
Showing
11 changed files
with
519 additions
and
115 deletions.
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,27 @@ | ||
name: Build & Test | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [18.x, 20.x, 22.x] | ||
fail-fast: false | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Use Node v${{ matrix.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Install Dependencies | ||
run: npm ci | ||
- name: Lint | ||
run: npm run lint | ||
- name: Test | ||
run: npm run test |
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,47 @@ | ||
name: Publish Release (npm) | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 22 | ||
- name: Install Dependencies | ||
run: npm ci | ||
- name: Lint | ||
run: npm run lint | ||
- name: Test | ||
run: npm test | ||
|
||
publish-npm: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 22.x | ||
registry-url: 'https://registry.npmjs.org' | ||
cache: 'npm' | ||
- run: npm ci | ||
- run: npm version ${TAG_NAME} --git-tag-version=false | ||
env: | ||
TAG_NAME: ${{ github.ref_name }} | ||
- run: npm publish --provenance --access public --tag next | ||
if: "github.event.release.prerelease" | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.npm_token }} | ||
- run: npm publish --provenance --access public | ||
if: "!github.event.release.prerelease" | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.npm_token }} |
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
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,35 @@ | ||
# nanoquery | ||
|
||
A lightweight query string parser/stringifier with support for nesting and some | ||
configurability. | ||
|
||
Built on top of [fast-querystring](https://github.com/anonrig/fast-querystring). | ||
|
||
## Install | ||
|
||
```sh | ||
npm i -S nanoquery | ||
``` | ||
|
||
## Usage | ||
|
||
Parsing a query string: | ||
|
||
```ts | ||
import {parse} from 'nanoquery'; | ||
|
||
parse('foo.bar=abc&baz=def'); | ||
|
||
/* | ||
{ | ||
foo: { | ||
bar: 'abc' | ||
}, | ||
baz: 'def' | ||
} | ||
*/ | ||
``` | ||
|
||
## License | ||
|
||
MIT |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Oops, something went wrong.