{ "name": "express-rate-limit", "version": "6.1.0", "description": "Basic IP rate-limiting middleware for Express. Use to limit repeated requests to public APIs and/or endpoints such as password reset.", "author": { "name": "Nathan Friedly", "url": "http://nfriedly.com/" }, "license": "MIT", "homepage": "https://github.com/nfriedly/express-rate-limit", "repository": "https://github.com/nfriedly/express-rate-limit", "keywords": [ "express-rate-limit", "express", "rate", "limit", "ratelimit", "rate-limit", "middleware", "ip", "auth", "authorization", "security", "brute", "force", "bruteforce", "brute-force", "attack" ], "type": "module", "exports": { ".": { "import": "./dist/index.mjs", "require": "./dist/index.cjs" } }, "main": "./dist/index.cjs", "module": "./dist/index.mjs", "types": "./dist/index.d.ts", "files": [ "dist/", "tsconfig.json", "package.json", "readme.md", "license.md", "changelog.md" ], "engines": { "node": ">= 14.5.0" }, "scripts": { "clean": "del-cli dist/ coverage/ *.log *.tmp *.bak *.tgz", "build:cjs": "esbuild --bundle --format=cjs --outfile=dist/index.cjs --footer:js=\"module.exports = rateLimit; module.exports.default = rateLimit; module.exports.rateLimit = rateLimit;\" source/index.ts", "build:esm": "esbuild --bundle --format=esm --outfile=dist/index.mjs source/index.ts", "build:types": "dts-bundle-generator --out-file=dist/index.d.ts source/index.ts", "compile": "run-s clean build:*", "lint:code": "xo --ignore test/external/", "lint:rest": "prettier --ignore-path .gitignore --ignore-unknown --check .", "lint": "run-s lint:*", "autofix:code": "xo --ignore test/external/ --fix", "autofix:rest": "prettier --ignore-path .gitignore --ignore-unknown --write .", "autofix": "run-s autofix:*", "test:lib": "cross-env NODE_OPTIONS=--experimental-vm-modules jest", "test:ext": "cd test/external/ && bash run-all-tests", "test": "run-s lint test:*", "pre-commit": "lint-staged", "prepare": "run-s compile && husky install config/husky" }, "peerDependencies": { "express": "^4" }, "devDependencies": { "@jest/globals": "^27.4.6", "@types/express": "^4.17.13", "@types/jest": "^27.4.0", "@types/node": "^16.11.19", "@types/supertest": "^2.0.11", "cross-env": "^7.0.3", "del-cli": "^4.0.1", "dts-bundle-generator": "^6.4.0", "esbuild": "^0.14.11", "express": "^4.17.1", "husky": "^7.0.4", "jest": "^27.4.7", "lint-staged": "^12.1.7", "npm-run-all": "^4.1.5", "supertest": "^6.2.1", "ts-jest": "^27.1.1", "ts-node": "^10.4.0", "typescript": "^4.5.2", "xo": "^0.47.0" }, "xo": { "prettier": true, "rules": { "@typescript-eslint/no-empty-function": 0, "@typescript-eslint/no-dynamic-delete": 0, "@typescript-eslint/no-confusing-void-expression": 0, "@typescript-eslint/consistent-indexed-object-style": [ "error", "index-signature" ] } }, "prettier": { "semi": false, "useTabs": true, "singleQuote": true, "bracketSpacing": true, "trailingComma": "all", "proseWrap": "always" }, "jest": { "preset": "ts-jest/presets/default-esm", "globals": { "ts-jest": { "useESM": true } }, "verbose": true, "collectCoverage": true, "collectCoverageFrom": [ "source/**/*.ts" ], "testTimeout": 30000, "testMatch": [ "**/test/library/**/*-test.[jt]s?(x)" ], "moduleFileExtensions": [ "js", "jsx", "json", "ts", "tsx" ], "moduleNameMapper": { "^(\\.{1,2}/.*)\\.js$": "$1" } }, "lint-staged": { "{source,test}/**/*.ts": "xo --ignore test/external/ --fix", "**/*.{json,yaml,md}": "prettier --ignore-path .gitignore --ignore-unknown --write " } }