UNPKG

@alwatr/fetch

Version:

`@alwatr/fetch` is an enhanced, lightweight, and dependency-free wrapper for the native `fetch` API. It provides modern features like caching strategies, request retries, timeouts, and intelligent duplicate request handling, all in a compact package.

90 lines (89 loc) 2.64 kB
{ "name": "@alwatr/fetch", "description": "`@alwatr/fetch` is an enhanced, lightweight, and dependency-free wrapper for the native `fetch` API. It provides modern features like caching strategies, request retries, timeouts, and intelligent duplicate request handling, all in a compact package.", "version": "6.0.3", "author": "S. Ali Mihandoost <ali.mihandoost@gmail.com>", "bugs": "https://github.com/Alwatr/nanolib/issues", "dependencies": { "@alwatr/delay": "6.0.1", "@alwatr/global-this": "5.5.10", "@alwatr/http-primer": "6.0.2", "@alwatr/logger": "5.5.10", "@alwatr/package-tracer": "5.5.10", "@alwatr/parse-duration": "5.5.11" }, "devDependencies": { "@alwatr/nano-build": "6.1.1", "@alwatr/prettier-config": "5.0.3", "@alwatr/tsconfig-base": "6.0.1", "@alwatr/type-helper": "6.0.1", "jest": "^30.1.3", "typescript": "^5.9.2" }, "exports": { ".": { "types": "./dist/main.d.ts", "import": "./dist/main.mjs", "require": "./dist/main.cjs" } }, "files": [ "**/*.{js,mjs,cjs,map,d.ts,html,md,LEGAL.txt}", "LICENSE", "!demo/**/*" ], "homepage": "https://github.com/Alwatr/nanolib/tree/next/packages/fetch#readme", "keywords": [ "alwatr", "api", "browser", "cache", "cross-platform", "ECMAScript", "esm", "fetch", "javascript", "module", "nanolib", "node", "nodejs", "request", "retry", "timeout", "typescript", "util", "utility", "utils" ], "license": "MPL-2.0", "main": "./dist/main.cjs", "module": "./dist/main.mjs", "prettier": "@alwatr/prettier-config", "publishConfig": { "access": "public" }, "repository": { "type": "git", "url": "https://github.com/Alwatr/nanolib", "directory": "packages/fetch" }, "scripts": { "b": "yarn run build", "build": "yarn run build:ts && yarn run build:es", "build:es": "nano-build --preset=module", "build:ts": "tsc --build", "c": "yarn run clean", "cb": "yarn run clean && yarn run build", "clean": "rm -rfv dist *.tsbuildinfo", "d": "yarn run build:es && yarn node --enable-source-maps --trace-warnings", "t": "yarn run test", "test": "NODE_OPTIONS=\"$NODE_OPTIONS --enable-source-maps --experimental-vm-modules\" jest", "w": "yarn run watch", "watch": "yarn run watch:ts & yarn run watch:es", "watch:es": "yarn run build:es --watch", "watch:ts": "yarn run build:ts --watch --preserveWatchOutput" }, "type": "module", "types": "./dist/main.d.ts", "gitHead": "cd02a1a9fa579930cd54291ba51ed86241313a6d" }