Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

Backward compatibility preserved
  • Loading branch information...
commit 71d7d4b41595aa61151adb397a11187a53f6122f 1 parent 0cda8ff
@koles authored
Showing with 14 additions and 3 deletions.
  1. +7 −2 lib/ya-csv.js
  2. +7 −1 test/index.js
View
9 lib/ya-csv.js
@@ -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
8 test/index.js
@@ -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';
Please sign in to comment.
Something went wrong with that request. Please try again.