1.0.2 • Published 6 years ago

@req-json/rate-limit v1.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
6 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

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago