Permalink
Browse files

Fixed 'The "sys" module is now called "util" warning

Backward compatibility preserved
  • Loading branch information...
1 parent 0cda8ff commit 71d7d4b41595aa61151adb397a11187a53f6122f @koles committed Feb 26, 2012
Showing with 14 additions and 3 deletions.
  1. +7 −2 lib/ya-csv.js
  2. +7 −1 test/index.js
View
@@ -1,5 +1,10 @@
-var sys = require('sys'),
- events = require('events'),
+var sys;
+try {
+ sys = require('util');
+} catch (e) {
+ sys = require('sys');
+}
+var events = require('events'),
fs = require('fs');
var csv = exports;
View
@@ -1,5 +1,11 @@
+var sys;
+try {
+ sys = require('util');
+} catch (e) {
+ sys = require('sys');
+}
+
var csv = require('../lib/ya-csv'),
- sys = require('sys'),
assert = require('assert');
var testFile = __dirname + '/crazy.csv';

0 comments on commit 71d7d4b

Please sign in to comment.