-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Shadi Abu Hilal
authored and
Shadi Abu Hilal
committed
Jan 11, 2024
1 parent
8997d6b
commit 7e4368e
Showing
60 changed files
with
1,146 additions
and
18,360 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 |
---|---|---|
@@ -1,13 +0,0 @@ | ||
## [1.0.1](https://github.com/shadiabuhilal/is-json-request/compare/v1.0.0...v1.0.1) (2023-12-10) | ||
|
||
|
||
### Bug Fixes | ||
|
||
* fix isJsonReq function to handle map headers object that is used in Next.JS ([451008e](https://github.com/shadiabuhilal/is-json-request/commit/451008e500e420dff4d791a6ba9ee56708df2e3a)) | ||
|
||
# 1.0.0 (2023-12-07) | ||
|
||
|
||
### Features | ||
|
||
* **first release:** first release ([c8042d8](https://github.com/shadiabuhilal/is-json-request/commit/c8042d89c15bf394407c8675344370c32941488d)) | ||
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 |
---|---|---|
@@ -1,78 +1,43 @@ | ||
# is-json-request | ||
![Build Status](https://github.com/shadiabuhilal/is-json-request/actions/workflows/push-workflows.yml/badge.svg) | ||
# firestore-query-operators | ||
![Build Status](https://github.com/shadiabuhilal/firestore-query-operators/actions/workflows/push-workflows.yml/badge.svg) | ||
|
||
Check if the current request is json, express js, next js, any node js server side code. (supports module and commonJS). | ||
Firestore query operators helper | ||
|
||
https://shadiabuhilal.github.io/is-json-request/ | ||
https://shadiabuhilal.github.io/firestore-query-operators/ | ||
|
||
----------- | ||
|
||
## Usage | ||
|
||
### import is-json-request | ||
### import firestore-query-operators | ||
```js | ||
import { isJsonReq, isGetReq, isPostReq, isPutReq, isDeleteReq } from 'is-json-request'; | ||
import { QueryOperators } from 'firestore-query-operators'; | ||
``` | ||
|
||
Or | ||
|
||
### require is-json-request | ||
### require firestore-query-operators | ||
```js | ||
const { isJsonReq, isGetReq, isPostReq, isPutReq, isDeleteReq } = require('is-json-request'); | ||
const { QueryOperators } = require('firestore-query-operators'); | ||
``` | ||
|
||
### isJsonReq | ||
This function checks if the current request is a json request or not. | ||
--- | ||
|
||
Example: | ||
### Available Query Operations | ||
Support query operations that used in firestore. | ||
|
||
```js | ||
if (isJsonReq(req)) { | ||
// Is a JSON request | ||
} | ||
``` | ||
|
||
### isGetReq | ||
This function checks if the current request is a http GET method request or not. | ||
| Variable | Oprator | Description | | ||
|-----|---------|--------------| | ||
| QueryOperators.lessThan | < | less than | | ||
| QueryOperators.lessThanOrEqualTo | <= | less than or equal to | | ||
| QueryOperators.equalTo | == | equal to | | ||
| QueryOperators.greaterThan | > | greater than | | ||
| QueryOperators.greaterThanOrEqualTo | >= | greater than or equal to | | ||
| QueryOperators.notEqualTo | != | not equal to | | ||
| QueryOperators.arrayContains | array-contains | array contains | | ||
| QueryOperators.arrayContainsAny | array-contains-any | array contains any | | ||
| QueryOperators.in | in | in | | ||
| QueryOperators.notIn | not-in | not-in | | ||
|
||
Example: | ||
|
||
```js | ||
if (isGetReq(req)) { | ||
// Is a HTTP GET method request | ||
} | ||
``` | ||
|
||
### isPostReq | ||
This function checks if the current request is a http POST method request or not. | ||
|
||
Example: | ||
|
||
```js | ||
if (isPostReq(req)) { | ||
// Is a HTTP POST method request | ||
} | ||
``` | ||
[Firestore query operations doc](https://firebase.google.com/docs/firestore/query-data/queries). | ||
|
||
|
||
### isPutReq | ||
This function checks if the current request is a http PUT method request or not. | ||
|
||
Example: | ||
|
||
```js | ||
if (isPutReq(req)) { | ||
// Is a HTTP PUT method request | ||
} | ||
``` | ||
|
||
### isDeleteReq | ||
This function checks if the current request is a http DELETE method request or not. | ||
|
||
Example: | ||
|
||
```js | ||
if (isDeleteReq(req)) { | ||
// Is a HTTP DELETE method request | ||
} | ||
``` |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
978 changes: 0 additions & 978 deletions
978
docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1,049 changes: 0 additions & 1,049 deletions
1,049
docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.