1.0.2 • Published 5 years ago

@req-json/rate-limit v1.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

@req-json/rate-limit

npm bundle size npm downloads license

github travis coverage

Rate limit middleware for req-json.

Installation

NPM

npm install @req-json/rate-limit --save
import ReqJSON from 'req-json';
import reqJSONRateLimit from '@req-json/rate-limit';

const reqJSON = new ReqJSON();
reqJSON.use(reqJSONRateLimit());

Browser

Direct <script> include window.reqJSONRateLimit

<script src="https://cdn.jsdelivr.net/npm/@req-json/rate-limit@1"></script>

Options

Rate limit middleware options and defaults.

reqJSON.use(reqJSONRateLimit({
  methods: [ // request methods to apply rate limit
    'POST',
    'PUT'
  ],
  frequency: 1000 // request only once in 1000ms
}));
1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.3.0

5 years ago

0.2.0

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago