File: chat-websocket/node_modules/socket.io/node_modules/redis/examples/sort.js

Recommend this page to a friend!
  Classes of Igor Escobar   Terminal Crossword   chat-websocket/node_modules/socket.io/node_modules/redis/examples/sort.js   Download  
File: chat-websocket/node_modules/socket.io/node_modules/redis/examples/sort.js
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Terminal Crossword
Generate a crosswords board on a text console
Author: By
Last change:
Date: 2 years ago
Size: 424 bytes
 

Contents

Class file image Download
var redis = require("redis"), client = redis.createClient(); client.sadd("mylist", 1); client.sadd("mylist", 2); client.sadd("mylist", 3); client.set("weight_1", 5); client.set("weight_2", 500); client.set("weight_3", 1); client.set("object_1", "foo"); client.set("object_2", "bar"); client.set("object_3", "qux"); client.sort("mylist", "by", "weight_*", "get", "object_*", redis.print); // Prints Reply: qux,foo,bar