1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-06 02:15:48 +03:00

Insert deprecation warnings and some minor refactoring

This commit is contained in:
Ruben Bridgewater
2016-03-01 17:11:02 +01:00
parent 19ea518b36
commit 575ad7357b
9 changed files with 140 additions and 46 deletions

View File

@@ -2,11 +2,16 @@
// helper to start and stop the stunnel process.
var spawn = require('child_process').spawn;
var EventEmitter = require('events').EventEmitter;
var EventEmitter = require('events');
var fs = require('fs');
var path = require('path');
var util = require('util');
// Newer Node.js versions > 0.10 return the EventEmitter right away and using .EventEmitter was deprecated
if (typeof EventEmitter !== 'function') {
EventEmitter = EventEmitter.EventEmitter;
}
function once(cb) {
var called = false;
return function() {