Skip to content
Browse files

[docs] generated docs using sed and a rip of the Redis offical docs

  • Loading branch information...
1 parent 7de6c0a commit 51146c923a80b2f2c5814e33a9f9c9b1053c07eb Paolo Fragomeni committed
Showing with 170 additions and 2 deletions.
  1. +170 −2 README.md
View
172 README.md
@@ -26,7 +26,9 @@ EventVat uses <a href="https://github.com/hij1nx/EventEmitter2">EventEmitter</a>
```javascript
var vat = EventVat();
- vat.on('get foo', function(key, value) {
+ vat.on('get foo', function(key, value)
+
+
console.log('`' + key + '` has the value: `' + value + '`');
});
@@ -34,6 +36,172 @@ EventVat uses <a href="https://github.com/hij1nx/EventEmitter2">EventEmitter</a>
vat.get('foo');
```
+# API
+
+## instance methods
+
+### publish()
+Synonymous with `EventEmitter2.prototype.emit`
+
+### subscribe()
+Synonymous with `EventEmitter2.prototype.on`
+
+### unsubscribe()
+Synonymous with `EventEmitter2.prototype.removeListener`
+
+### die(key)
+Expire a key
+
+### del(key /* ... */)
+Delete a key
+
+### exists(key)
+Determine if a key exists
+
+### expire(key, ttl)
+Set a key's time to live in seconds
+
+### expireat(key, dueDate)
+Set the expiration for a key as a UNIX timestamp
+
+### keys(regex)
+Find all keys matching the given pattern
+
+### move(key, db)
+Move a key to another database
+
+### object(subcommend /* ... */)
+Inspect the internals of an object
+
+### persist(key)
+Remove the expiration from a key
+
+### randomkey()
+Return a random key from the keyspace
+
+### rename(oldKey, newKey)
+Rename a key
+
+### renamenx(oldKey, newKey)
+Rename a key, only if the new key does not exist
+
+### sort()
+Sort the elements in a list, set or sorted set
+
+### type(key)
+Determine the type stored at key
+
+### ttl(key)
+Get the time to live for a key
+
+### append(key, value)
+Append a value to a key
+
+### decr(key)
+Decrement the integer value of a key by one
+
+### decrby(key, value)
+Decrement the integer value of a key by the given number
+
+### get(key)
+Get the value of a key
+
+### getbit(key)
+Returns the bit value at offset in the string value stored at key
+
+### getrange(key, start, end)
+Get a substring of the string stored at a key
+
+### getset(key, value)
+Set the string value of a key and return its old value
+
+### incr(key)
+Increment the integer value of a key by one
+
+### incrby(key, value)
+Increment the integer value of a key by the given number
+
+### mget(key /* ... */)
+Get the values of all the given keys
+
+### mset(keys /* ... */, values /* ... */)
+Set multiple keys to multiple values
+
+### msetnx(keys /* ... */, values /* ... */)
+Set multiple keys to multiple values, only if none of the keys exist
+
+### set(key, value, ttl)
+Set the string value of a key
+
+### setbit(key, offset, value)
+Sets or clears the bit at offset in the string value stored at key
+
+### setex(key, seconds, value)
+Set the value and expiration of a key
+
+### setnx(key, value, ttl)
+Set the value of a key, only if the key does not exist
+
+### setrange(key, offset, value)
+Overwrite part of a string at key starting at the specified offset
+
+### strlen(key)
+Get the length of the value stored in a key
+
+### hdel(key, field /* ... */)
+Delete one or more hash fields
+
+### hexists(key, field)
+Determine if a hash field exists
+
+### hget(key, field)
+Get the value of a hash field
+
+### hgetall(key)
+Get all the fields and values in a hash
+
+### hincr(key, field)
+Increment the integer value of a hash field by one
+
+### hincrby(key, field, value)
+Increment the integer value of a hash field by the given number
+
+### hdecr(key, field)
+Decrement the integer value of a hash field by one
+
+### hdecrby(key, field, value)
+Decrement the integer value of a hash field by the given number
+
+### hkeys(key)
+Get all the fields in a hash
+
+### hlen(key)
+Get the number of fields in a hash
+
+### hmget(key, field /* ... */)
+Get the values of all the given hash fields
+
+### hmset(key, fields /* ... */, values /* ... */)
+Set multiple hash fields to multiple values
+
+### hset(key, field, value)
+Set the string value of a hash field
+
+### hsetnx(key, field, value /* ... */)
+Set the value of a hash field, only if the field does not exist
+
+### hvals(key)
+Get all the values in a hash
+
+### dump(stringify)
+Dump the current data store into a string
+
+### swap(a, b, depth)
+Swap two values
+
+### findin(key, value)
+Search within the value of a key
+
# Tests
```bash
@@ -48,4 +216,4 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE DBSIZEORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

0 comments on commit 51146c9

Please sign in to comment.
Something went wrong with that request. Please try again.