Skip to content

Commit 735a701

Browse files
update to 2.0.3
1 parent 13125f3 commit 735a701

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

README.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
# rlimit [![Build Status](https://secure.travis-ci.org/AfterShip/rate-limiter.png?branch=master)](http://travis-ci.org/AfterShip/rate-limiter)
2-
3-
## This is unstable branch, please use 1.x version for production
1+
# rate-limiter [![Build Status](https://secure.travis-ci.org/AfterShip/rate-limiter.png?branch=master)](http://travis-ci.org/AfterShip/rate-limiter)
42

53
The Real Redis Rate Limiter for Node.js
64

lib/index.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* r3limiter
2+
* Limiter
33
* https://github.com/AfterShip/r3limiter
44
*
55
* Copyright (c) 2015 AfterShip
@@ -12,7 +12,7 @@
1212
var fs = require('fs');
1313

1414
/**
15-
* R3Limiter constructor
15+
* Limiter constructor
1616
* options:
1717
* {
1818
* redis_client: redis connection client instance
@@ -24,7 +24,7 @@
2424
* @param options {Object} - option parameters
2525
* @constructor
2626
*/
27-
function R3Limiter(options) {
27+
function Limiter(options) {
2828
this.redis_client = options.redis_client;
2929
this.key = options.key ? 'limit:' + options.key : 'limit:';
3030
this.limit = options.limit || 10;
@@ -47,7 +47,7 @@
4747
* }
4848
* @param callback {function(Object, Object=)} - finish callback
4949
*/
50-
R3Limiter.prototype.get = function(callback) {
50+
Limiter.prototype.get = function(callback) {
5151

5252
var _this = this;
5353
this._executeFunction(callback);
@@ -62,7 +62,7 @@
6262
* err: error
6363
* @param callback {function(Object=)} - finish callback
6464
*/
65-
R3Limiter.prototype.run = function(callback) {
65+
Limiter.prototype.run = function(callback) {
6666
var _this = this;
6767
this.get(function(err, result) {
6868
if (err || !result) {
@@ -84,7 +84,7 @@
8484
* @param callback
8585
* @private
8686
*/
87-
R3Limiter.prototype._executeFunction = function(callback) {
87+
Limiter.prototype._executeFunction = function(callback) {
8888

8989
var _this = this;
9090

@@ -109,5 +109,5 @@
109109
});
110110
};
111111

112-
module.exports = R3Limiter;
112+
module.exports = Limiter;
113113
})();

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@aftership/rate-limiter",
33
"description": "The Real Redis Rate Limiter for Node.js, accept ioredis client only for redis cluster",
4-
"version": "2.0.2",
4+
"version": "2.0.3",
55
"homepage": "https://github.com/AfterShip/rate-limiter",
66
"author": {
77
"name": "AfterShip",

0 commit comments

Comments
 (0)