react-cancelable
Advanced tools
Comparing version 0.0.1-alpha.2 to 0.0.1-alpha.3
{ | ||
"name": "react-cancelable", | ||
"version": "0.0.1-alpha.2", | ||
"version": "0.0.1-alpha.3", | ||
"main": "./lib/cjs/index.js", | ||
@@ -21,15 +21,13 @@ "module": "./lib/esm/index.js", | ||
"scripts": { | ||
"start": "yarn build && (cd example && yarn start)", | ||
"build:cjs": "tsc --module commonjs --outDir lib/cjs", | ||
"build:esm": "tsc", | ||
"build": "yarn build:esm && yarn build:cjs", | ||
"pub": "yarn test --watchAll=false && yarn publish", | ||
"start": "yarn build && yarn --cwd ./example start", | ||
"test:lazy": "yarn --cwd ./example test", | ||
"test": "yarn build && yarn test:lazy", | ||
"test:lazy": "(cd example && yarn test)", | ||
"watch": "tsc -w", | ||
"build": "yarn build:esm && yarn build:cjs", | ||
"build:esm": "tsc", | ||
"build:cjs": "tsc --module commonjs --outDir lib/cjs", | ||
"pub:alpha": "npm publish --tag alpha", | ||
"pub": "npm publish" | ||
"watch": "tsc -w" | ||
}, | ||
"peerDependencies": { | ||
"react": "^17.0.0", | ||
"react-dom": "^17.0.0" | ||
"react": ">=16.8" | ||
}, | ||
@@ -36,0 +34,0 @@ "devDependencies": { |
@@ -40,6 +40,6 @@ <h1 align="center">react-cancelable<i>(alpha)</i></h1> | ||
``` | ||
npm install react-cancelable | ||
npm install react-cancelable | ||
``` | ||
``` | ||
yarn add react-cancelable | ||
yarn add react-cancelable | ||
``` | ||
@@ -56,3 +56,2 @@ | ||
"react": "^17.0.0", | ||
"react-dom": "^17.0.0" | ||
} | ||
@@ -355,3 +354,5 @@ ``` | ||
cancelable(fn: RequestFn, controller?: AbortController): Promise<any> & { cancel: VoidFunction} | ||
type RequestPromise = Promise<any> & { cancel: VoidFunction } | ||
cancelable(fn: RequestFn, controller?: AbortController): RequestPromise | ||
``` | ||
@@ -418,3 +419,3 @@ | ||
There is no differen what HTTP client you use. Package have one important rule - HTTP client must accept [AbortController signal](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/signal). | ||
There is no difference what HTTP client you use. Package have one important rule - HTTP client must accept [AbortController signal](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/signal). | ||
@@ -421,0 +422,0 @@ ```javascript |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1
451
33671