Skip to content

Commit

Permalink
Merge pull request #16 from ksplatdev/staging
Browse files Browse the repository at this point in the history
1.1.1
  • Loading branch information
art-emini authored Sep 2, 2021
2 parents 2ee8152 + f5b9af8 commit 5ab7932
Show file tree
Hide file tree
Showing 5 changed files with 152 additions and 76 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
![GitHub release (latest by date)](https://img.shields.io/github/v/release/ksplatdev/AxleJS)
![GitHub last commit](https://img.shields.io/github/last-commit/ksplatdev/AxleJS)
![GitHub Workflow Status](https://img.shields.io/github/workflow/status/ksplatdev/AxleJS/CodeQL)
![NPM Downloads](https://img.shields.io/npm/dm/axlejs?label=npm%20downloads)
![jsDelivr hits (npm)](https://img.shields.io/jsdelivr/npm/hm/axlejs)
![Active Development](https://img.shields.io/badge/Maintenance%20Level-Actively%20Developed-brightgreen.svg)

Fetch, supercharged.

Expand Down Expand Up @@ -46,7 +49,7 @@ AxleJS supercharges fetch, with better error handling, easier to use options, ca

### CDN

1. Import from <https://cdn.jsdelivr.net/npm/[email protected].0/dist/index.js> or for minified version <https://cdn.jsdelivr.net/npm/[email protected].0/dist/index.min.js>.
1. Import from <https://cdn.jsdelivr.net/npm/[email protected].1/dist/index.js> or for minified version <https://cdn.jsdelivr.net/npm/[email protected].1/dist/index.min.js>.
2. Read the [documentation](https://github.com/ksplatdev/AxleJS/wiki/Documenation).

## Quick Start
Expand Down
207 changes: 139 additions & 68 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "axlejs",
"version": "1.1.0",
"version": "1.1.1",
"description": "Fetch, supercharged.",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
Expand All @@ -9,9 +9,9 @@
"build": "sh scripts/build.sh",
"bundle": "npx webpack --config webpack.config.js",
"format": "npx prettier --config .prettierrc --write \"src/**/*.ts\"",
"format:watch": "npx onchange \"src/**/*.ts\" \"*.json\" \"*.md\" \"examples/**/*.ts\" -- prettier --write --ignore-unknown {{changed}}",
"format:watch": "npx onchange \"src/**/*.ts\" \"*.json\" \"*.md\" \"examples/**/*.ts\" \"test/**/*.ts\" -- prettier --write --ignore-unknown {{changed}}",
"lint": "npx eslint -c .eslintrc.json src/",
"lint:watch": "npx onchange \"src/**/*.ts\" \"examples/**/*.ts\" -- eslint -c .eslintrc.json --fix {{changed}}",
"lint:watch": "npx onchange \"src/**/*.ts\" \"examples/**/*.ts\" \"test/**/*.ts\" -- eslint -c .eslintrc.json --fix {{changed}}",
"lint:fix": "npx eslint -c .eslintrc.json --fix src/",
"minify": "npx uglifyjs dist/index.js -c -o dist/index.min.js"
},
Expand All @@ -21,11 +21,13 @@
},
"keywords": [
"fetch",
"wrapper",
"ts",
"request",
"api",
"client",
"fast",
"overpowered",
"supercharges",
"axle"
],
"author": "Bleart Emini",
Expand All @@ -39,7 +41,7 @@
"@typescript-eslint/parser": "^4.29.3",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^3.4.1",
"eslint-plugin-prettier": "^4.0.0",
"onchange": "^7.1.0",
"open-cli": "^7.0.0",
"prettier": "^2.3.2",
Expand Down
2 changes: 1 addition & 1 deletion src/models/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default class AxleRequest<t = Record<string, any>> {
let fetchBody: t | FormData | string | undefined | null = this.body;

// eslint-disable-next-line @typescript-eslint/no-explicit-any
if (isJSON(fetchBody as Record<string, any>)) {
if (isJSON(fetchBody)) {
fetchBody = JSON.stringify(this.body) as string;
} else {
fetchBody = this.body as FormData;
Expand Down
2 changes: 1 addition & 1 deletion src/utils/isJSON.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export default function isJSON(json: Record<string, any>) {
export default function isJSON(json: any) {
try {
const jsonStr = JSON.stringify(json);
JSON.parse(jsonStr);
Expand Down

0 comments on commit 5ab7932

Please sign in to comment.