@bishal-shrestha/rest-client
Version:
A lightweight and flexible REST API client for JavaScript and TypeScript, supporting CommonJS and ES modules (ESM). Features include HTTP methods (GET, POST, PUT, PATCH, DELETE), built-in retry policies with exponential backoff, request lifecycle hooks fo
199 lines (198 loc) • 4.95 kB
JSON
{
"name": "@bishal-shrestha/rest-client",
"version": "1.0.7",
"type": "module",
"description": "A lightweight and flexible REST API client for JavaScript and TypeScript, supporting CommonJS and ES modules (ESM). Features include HTTP methods (GET, POST, PUT, PATCH, DELETE), built-in retry policies with exponential backoff, request lifecycle hooks for detailed logging, configurable timeouts, and strong TypeScript typings for seamless integration.",
"author": {
"name": "Bishal Shrestha",
"url": "https://github.com/shrestha-bishal"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/shrestha-bishal/rest-client-js/issues"
},
"homepage": "https://rest-client-docs.netlify.app/",
"main": "./dist/cjs/index.cjs",
"module": "./dist/esm/index.js",
"types": "./dist/types/index.d.ts",
"directories": {
"example": "examples"
},
"exports": {
"import": "./dist/esm/index.js",
"require": "./dist/cjs/index.cjs",
"types": "./dist/types/index.d.ts",
"umd": "./dist/umd/rest-client.umd.js"
},
"scripts": {
"build:cjs": "cross-env BABEL_ENV=cjs babel src --extensions \".ts,.js\" --out-dir dist/cjs && node rename-cjs.js",
"build:esm": "cross-env BABEL_ENV=esm babel src --extensions \".ts,.js\" --out-dir dist/esm",
"build:types": "tsc --emitDeclarationOnly --outDir dist/types",
"build:umd": "rollup -c",
"build": "npm run build:cjs && npm run build:esm && npm run build:types && npm run build:umd",
"prepare": "npm run build",
"test": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js"
},
"repository": {
"type": "git",
"url": "git+https://github.com/shrestha-bishal/rest-client-js.git"
},
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/shrestha-bishal"
},
{
"type": "buy-me-a-coffee",
"url": "https://www.buymeacoffee.com/shresthabishal"
},
{
"type": "other",
"url": "https://thanks.dev/gh/shrestha-bishal"
}
],
"files": [
"dist",
"README.md",
"LICENSE"
],
"devDependencies": {
"@babel/cli": "^7.27.2",
"@babel/core": "^7.27.4",
"@babel/preset-env": "^7.27.2",
"@babel/preset-typescript": "^7.27.1",
"@jest/environment": "^30.0.0",
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-commonjs": "^28.0.6",
"@rollup/plugin-node-resolve": "^16.0.1",
"@rollup/plugin-terser": "^0.4.4",
"@types/jest": "^30.0.0",
"cross-env": "^7.0.3",
"jest": "^30.0.0",
"jest-fetch-mock": "^3.0.3",
"rollup": "^4.44.0",
"rollup-plugin-typescript2": "^0.36.0",
"ts-jest": "^29.4.0",
"typescript": "^5.8.3"
},
"publishConfig": {
"access": "public"
},
"babel": {
"presets": [
"@babel/preset-typescript",
[
"@babel/preset-env",
{
"modules": false
}
]
],
"env": {
"cjs": {
"presets": [
"@babel/preset-typescript",
[
"@babel/preset-env",
{
"modules": "commonjs"
}
]
]
},
"esm": {
"presets": [
"@babel/preset-typescript",
[
"@babel/preset-env",
{
"modules": false
}
]
]
}
}
},
"keywords": [
"rest",
"http",
"client",
"rest-client",
"restclient",
"rest api",
"api client",
"http client",
"fetch",
"axios alternative",
"ky alternative",
"retry",
"timeout",
"abort",
"cancel request",
"payload",
"headers",
"get",
"post",
"put",
"delete",
"patch",
"typescript",
"javascript",
"restful",
"api wrapper",
"rest wrapper",
"http wrapper",
"request client",
"api",
"rest-api",
"lightweight",
"modular",
"plugin based",
"plugin system",
"middleware",
"interceptor",
"request interceptor",
"response interceptor",
"rest client library",
"typescript http client",
"javascript rest client",
"api utility",
"http utility",
"rest api client",
"custom fetch",
"fetch wrapper",
"retry strategy",
"exponential backoff",
"request timeout",
"request cancellation",
"abort controller",
"rest client with retry",
"fetch with timeout",
"http abstraction",
"api integration",
"network request",
"cross-platform api client",
"browser api client",
"esm",
"ecmascript modules",
"cjs",
"commonjs",
"umd",
"universal module definition",
"esm support",
"ecmascript modules support",
"cjs support",
"commonjs support",
"umd support",
"universal module definition support",
"multi-format",
"module support",
"build formats",
"axios",
"ky",
"got",
"superagent",
"node-fetch",
"request"
]
}