This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var r = require('rethinkdb'); | |
// you'd have to pass in an open rethink and deepstream connection, but that's trivial code to write | |
// rewrite of deepstream.io-provider-search-rethinkdb | |
module.exports = function(conn, client) { | |
var searches = new Map(); | |
var pk = 'ds_id'; | |
function getRow(path) { | |
// cribbed from official release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var EventEmitter = require('events'); | |
var crypto = require('crypto'); | |
var r = require('rethinkdb'); | |
// source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions | |
function escapeRegExp(string) { | |
return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string | |
} |