Skip to content

Commit

Permalink
Merge pull request #38 from torusresearch/feat/ts-5
Browse files Browse the repository at this point in the history
- fix all issues
  • Loading branch information
arch1995 authored Aug 8, 2023
2 parents cf0a896 + 9262cef commit 38ea839
Show file tree
Hide file tree
Showing 10 changed files with 4,821 additions and 3,639 deletions.
22 changes: 22 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
require("@rushstack/eslint-patch/modern-module-resolution");

module.exports = {
root: true,
extends: ["@toruslabs/typescript"],
parser: "@typescript-eslint/parser",
ignorePatterns: ["*.config.js", ".eslintrc.js"],
parserOptions: {
sourceType: "module",
ecmaVersion: 2022,
project: "./tsconfig.json",
},
globals: {
document: true,
fetch: true,
jest: true,
it: true,
beforeEach: true,
afterEach: true,
describe: true,
},
};
20 changes: 0 additions & 20 deletions .eslintrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
>=16.18.1
>=18.x
1 change: 1 addition & 0 deletions .prettierrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
printWidth: 150
singleQuote: false
semi: true
trailingComma: es5
10 changes: 2 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,11 @@

### Bundling

This module is distributed in 4 formats
This module is distributed in 3 formats

- `esm` build `dist/httpHelpers.esm.js` in es6 format
- `commonjs` build `dist/httpHelpers.cjs.js` in es5 format
- `umd` build `dist/httpHelpers.umd.min.js` in es5 format without polyfilling corejs minified
- `node` build `dist/httpHelpers-node.js` in es5 format

By default, the appropriate format is used for your specified usecase
You can use a different format (if you know what you're doing eg. node) by referencing the correct file
Expand Down Expand Up @@ -54,12 +53,7 @@ import { get, post } from "@toruslabs/http-helpers";
const { get, post } = require("@toruslabs/http-helpers").default;
```

```js
// For Node.js
const { get, post } = require("@toruslabs/http-helpers/dist/httpHelpers-node.js").default;
```

## Requirements

- This package requires a peer dependency of `@babel/runtime`
- Node 14+
- Node 18+
Loading

0 comments on commit 38ea839

Please sign in to comment.